Skip to content

Commit bc72625

Browse files
committed
reorder
1 parent 0e69269 commit bc72625

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

packages/replay/src/replay.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1085,9 +1085,6 @@ export class ReplayContainer implements ReplayContainerInterface {
10851085
// This uses the data from the eventBuffer, so we need to call this before `finish()
10861086
this._updateInitialTimestampFromEventBuffer();
10871087

1088-
// Note this empties the event buffer regardless of outcome of sending replay
1089-
const recordingData = await this.eventBuffer.finish();
1090-
10911088
const timestamp = Date.now();
10921089

10931090
// Check total duration again, to avoid sending outdated stuff
@@ -1102,6 +1099,9 @@ export class ReplayContainer implements ReplayContainerInterface {
11021099
const segmentId = this.session.segmentId++;
11031100
this._maybeSaveSession();
11041101

1102+
// Note this empties the event buffer regardless of outcome of sending replay
1103+
const recordingData = await this.eventBuffer.finish();
1104+
11051105
await sendReplay({
11061106
replayId,
11071107
recordingData,

0 commit comments

Comments
 (0)