Skip to content

Commit 4c6f62e

Browse files
authored
ref(replay): Ensure we only clear for buffer mode (#8744)
This _shouldn't_ happen, but it makes sense to guard so we only clear the event buffer cache on checkouts when in `buffer` mode. I guess the behavior of rrweb is not 100% defined in that it _cannot_ generate a new checkout in non-buffer mode 🤔 better safe than sorry.
1 parent 88e9418 commit 4c6f62e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/replay/src/util/addEvent.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ export async function addEvent(
4040
}
4141

4242
try {
43-
if (isCheckout) {
43+
if (isCheckout && replay.recordingMode === 'buffer') {
4444
replay.eventBuffer.clear();
4545
}
4646

0 commit comments

Comments
 (0)