File tree Expand file tree Collapse file tree 1 file changed +8
-9
lines changed
packages/replay-internal/src/util Expand file tree Collapse file tree 1 file changed +8
-9
lines changed Original file line number Diff line number Diff line change @@ -54,8 +54,7 @@ async function _addEvent(
54
54
event : RecordingEvent ,
55
55
isCheckout ?: boolean ,
56
56
) : Promise < AddEventResult | null > {
57
- if ( ! replay . eventBuffer ) {
58
- // || (replay.eventBuffer.waitForCheckout && !isCheckout)) {
57
+ if ( ! replay . eventBuffer || ( replay . eventBuffer . waitForCheckout && ! isCheckout ) ) {
59
58
return null ;
60
59
}
61
60
@@ -84,13 +83,13 @@ async function _addEvent(
84
83
const isExceeded = error && error instanceof EventBufferSizeExceededError ;
85
84
const reason = isExceeded ? 'addEventSizeExceeded' : 'addEvent' ;
86
85
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
+ }
94
93
95
94
replay . handleException ( error ) ;
96
95
You can’t perform that action at this time.
0 commit comments