File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -836,9 +836,6 @@ export class ReplayContainer implements ReplayContainerInterface {
836
836
// Only attach memory entry if eventBuffer is not empty
837
837
promises . push ( addMemoryEntry ( this ) ) ;
838
838
839
- // This empties the event buffer regardless of outcome of sending replay
840
- promises . push ( this . eventBuffer . finish ( ) ) ;
841
-
842
839
// NOTE: Copy values from instance members, as it's possible they could
843
840
// change before the flush finishes.
844
841
const replayId = this . session . id ;
@@ -865,7 +862,10 @@ export class ReplayContainer implements ReplayContainerInterface {
865
862
866
863
// NOTE: Be mindful that nothing after this point (the first `await`)
867
864
// will run after when the page is unloaded.
868
- const [ , , recordingData ] = await Promise . all ( promises ) ;
865
+ await Promise . all ( promises ) ;
866
+
867
+ // This empties the event buffer regardless of outcome of sending replay
868
+ const recordingData = await this . eventBuffer . finish ( ) ;
869
869
870
870
const sendReplayPromise = sendReplay ( {
871
871
replayId,
You can’t perform that action at this time.
0 commit comments