Skip to content

Commit

Permalink
fix(rrweb): check null
Browse files Browse the repository at this point in the history
  • Loading branch information
jxiwang committed Oct 3, 2024
1 parent 6ac2c27 commit d83c56b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/rrweb/src/record/mutation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,7 @@ export default class MutationBuffer {
texts: this.texts
.map((text) => {
const n = text.node;
if ((n.parentNode as Element).tagName === 'TEXTAREA') {
if (n.parentNode && (n.parentNode as Element).tagName === 'TEXTAREA') {
// the node is being ignored as it isn't in the mirror, so shift mutation to attributes on parent textarea
this.genTextAreaValueMutation(n.parentNode as HTMLTextAreaElement);
}
Expand Down

0 comments on commit d83c56b

Please sign in to comment.