Skip to content

Commit

Permalink
fix rrweb-io#460 ignore added node that are not in document anymore
Browse files Browse the repository at this point in the history
  • Loading branch information
Yuyz0112 authored and eoghanmurray committed Feb 22, 2021
1 parent 01e59b8 commit 9ce8ab4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/record/mutation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ export default class MutationBuffer {
return nextId;
};
const pushAdd = (n: Node) => {
if (!n.parentNode) {
if (!n.parentNode || !document.contains(n)) {
return;
}
const parentId = mirror.getId((n.parentNode as Node) as INode);
Expand Down

0 comments on commit 9ce8ab4

Please sign in to comment.