Skip to content

Commit 6a588a2

Browse files
committed
conditionally initiate weakMap
1 parent 58cb8fa commit 6a588a2

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

packages/replay-internal/src/replay.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,9 @@ export class ReplayContainer implements ReplayContainerInterface {
285285
handleKeyboardEvent(this, event);
286286
};
287287

288-
this._lastMutationMap = new WeakMap();
288+
if (options._experiments.dropRepetitiveMutations) {
289+
this._lastMutationMap = new WeakMap();
290+
}
289291
}
290292

291293
/** Get the event context. */

0 commit comments

Comments
 (0)