Skip to content

Commit 5964c0f

Browse files
billyvgc298lee
andauthored
Update packages/replay-internal/src/util/handleRecordingEmit.ts
Co-authored-by: Catherine Lee <[email protected]>
1 parent d7af0a9 commit 5964c0f

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

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

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,12 +74,11 @@ export function getHandleRecordingEmit(replay: ReplayContainer): RecordingEmitCa
7474

7575
// When in buffer mode, make sure we adjust the session started date to the current earliest event of the buffer
7676
// this should usually be the timestamp of the checkout event, but to be safe...
77-
if (replay.recordingMode === 'buffer' && session) {
77+
if (replay.recordingMode === 'buffer' && session && replay.eventBuffer) {
7878
DEBUG_BUILD &&
79-
replay.eventBuffer &&
8079
logger.info('Attempting to fetch earliest event from event buffer type: ', replay.eventBuffer.type);
8180

82-
const earliestEvent = replay.eventBuffer && replay.eventBuffer.getEarliestTimestamp();
81+
const earliestEvent = replay.eventBuffer.getEarliestTimestamp();
8382

8483
if (earliestEvent) {
8584
DEBUG_BUILD &&

0 commit comments

Comments
 (0)