Skip to content

Commit 893520f

Browse files
committed
Revert "undo for tests"
This reverts commit b992110.
1 parent 48b9cb7 commit 893520f

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

packages/replay-internal/src/util/addEvent.ts

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,7 @@ async function _addEvent(
5454
event: RecordingEvent,
5555
isCheckout?: boolean,
5656
): Promise<AddEventResult | null> {
57-
if (!replay.eventBuffer) {
58-
// || (replay.eventBuffer.waitForCheckout && !isCheckout)) {
57+
if (!replay.eventBuffer || (replay.eventBuffer.waitForCheckout && !isCheckout)) {
5958
return null;
6059
}
6160

@@ -84,13 +83,13 @@ async function _addEvent(
8483
const isExceeded = error && error instanceof EventBufferSizeExceededError;
8584
const reason = isExceeded ? 'addEventSizeExceeded' : 'addEvent';
8685

87-
// if (isExceeded && isBufferMode) {
88-
// // Clear buffer and wait for next checkout
89-
// replay.eventBuffer.clear();
90-
// replay.eventBuffer.waitForCheckout = true;
91-
//
92-
// return null;
93-
// }
86+
if (isExceeded && isBufferMode) {
87+
// Clear buffer and wait for next checkout
88+
replay.eventBuffer.clear();
89+
replay.eventBuffer.waitForCheckout = true;
90+
91+
return null;
92+
}
9493

9594
replay.handleException(error);
9695

0 commit comments

Comments
 (0)