We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3d1877c commit 02f50d2Copy full SHA for 02f50d2
.changeset/three-baboons-bow.md
@@ -0,0 +1,5 @@
1
+---
2
+'rrweb': patch
3
4
+
5
+fix: protect against missing parentNode
packages/rrweb/src/record/mutation.ts
@@ -441,7 +441,10 @@ export default class MutationBuffer {
441
texts: this.texts
442
.map((text) => {
443
const n = text.node;
444
- if ((n.parentNode as Element).tagName === 'TEXTAREA') {
+ if (
445
+ n.parentNode &&
446
+ (n.parentNode as Element).tagName === 'TEXTAREA'
447
+ ) {
448
// the node is being ignored as it isn't in the mirror, so shift mutation to attributes on parent textarea
449
this.genTextAreaValueMutation(n.parentNode as HTMLTextAreaElement);
450
}
0 commit comments