Skip to content

Commit

Permalink
Apply formatting changes
Browse files Browse the repository at this point in the history
  • Loading branch information
mydea committed Feb 27, 2023
1 parent 028c41c commit aecdcf9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion packages/rrweb-snapshot/src/snapshot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,11 @@ export function transformAttribute(
}
}

export function ignoreAttribute(tagName: string, name: string, _value: unknown): boolean {
export function ignoreAttribute(
tagName: string,
name: string,
_value: unknown,
): boolean {
return (tagName === 'video' || tagName === 'audio') && name === 'autoplay';
}

Expand Down
2 changes: 1 addition & 1 deletion packages/rrweb/src/record/mutation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -558,7 +558,7 @@ export default class MutationBuffer {
styleObj[pname] = false; // delete
}
}
} else if(!ignoreAttribute(target.tagName, m.attributeName!, value)) {
} else if (!ignoreAttribute(target.tagName, m.attributeName!, value)) {
// overwrite attribute if the mutations was triggered in same time
item.attributes[m.attributeName!] = transformAttribute(
this.doc,
Expand Down

0 comments on commit aecdcf9

Please sign in to comment.