Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Update isSerialized logic
  • Loading branch information
rahulrelicx committed Apr 14, 2022
commit d1b0d2236ca99af4abd1da2545ac13049bedfa26
2 changes: 1 addition & 1 deletion packages/rrweb/src/record/mutation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -527,7 +527,7 @@ export default class MutationBuffer {
if (
isBlocked(m.target, this.blockClass) ||
isIgnored(n, this.mirror) ||
!isSerialized(n)
!isSerialized(n, this.mirror)
) {
return;
}
Expand Down
4 changes: 2 additions & 2 deletions packages/rrweb/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -213,8 +213,8 @@ export function isBlocked(node: Node | null, blockClass: blockClass): boolean {
return isBlocked(node.parentNode, blockClass);
}

export function isSerialized(n: Node): boolean {
return '__sn' in n;
export function isSerialized(n: Node, mirror: Mirror): boolean {
return mirror.getId(n) !== -1;
}

export function isIgnored(n: Node, mirror: Mirror): boolean {
Expand Down