close #319 handle undefined nextId

Looks like some serializer will omit field with null value, so we
do some checks in the replayer to avoid of dead loop.
This commit is contained in:
Yanzhen Yu
2020-09-06 18:24:27 +08:00
parent cdebe18803
commit f52b02f4b1

View File

@@ -817,7 +817,12 @@ export class Replayer {
next = mirror.getNode(mutation.nextId) as Node;
}
// next not present at this moment
if (mutation.nextId !== null && mutation.nextId !== -1 && !next) {
if (
mutation.nextId !== null &&
mutation.nextId !== undefined &&
mutation.nextId !== -1 &&
!next
) {
return queue.push(mutation);
}