mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2024-11-20 03:25:52 +01:00
Also allow undefined, which means at the end of the paginated direction
we already detect the end by chunk.length===0, so we just need to not throw
This commit is contained in:
parent
623939c671
commit
84bac0afe9
@ -163,7 +163,7 @@ export class GapWriter {
|
||||
if (!Array.isArray(chunk)) {
|
||||
throw new Error("Invalid chunk in response");
|
||||
}
|
||||
if (typeof end !== "string") {
|
||||
if (typeof end !== "string" && typeof end !== "undefined") {
|
||||
throw new Error("Invalid end token in response");
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user