Skip to content

Commit

Permalink
Merge pull request #29 from amplitude/AMP-111839
Browse files Browse the repository at this point in the history
fix(rrweb): check null
  • Loading branch information
jxiwang authored Oct 3, 2024
2 parents 6ac2c27 + f3889e5 commit 5de3c84
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/rrweb/src/record/mutation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,10 @@ 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 5de3c84

Please sign in to comment.