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 Jan 20, 2021
1 parent cc6dd3b commit bfda124
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 bfda124

Please sign in to comment.