Skip to content

Commit 1c7a082

Browse files
committed
Update ReplayRecorder.js
1 parent 10d5be9 commit 1c7a082

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/ReplayRecorder.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ export default class ReplayRecorder {
3131
}
3232

3333
isFull() {
34-
if (this.actions && this.actions.length > 10000) {
34+
if (this.actions && this.actions.length > 5000) {
3535
return true;
3636
}
3737
return false;
@@ -521,7 +521,7 @@ export default class ReplayRecorder {
521521
}
522522
}
523523
}
524-
524+
525525
const nodesWithAddedChildren = [];
526526
for (const r of records) {
527527
const target = r.target;
@@ -554,7 +554,9 @@ export default class ReplayRecorder {
554554
}
555555
case "characterData": {
556556
const a = {};
557-
a[REPLAYREC_TEXT] = [id, target.data];
557+
if (target.nodeType === Node.TEXT_NODE) {
558+
a[REPLAYREC_TEXT] = [id, target.data];
559+
}
558560
this.actions.push(a);
559561
break;
560562
}

0 commit comments

Comments
 (0)