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 {
836836 // Only attach memory entry if eventBuffer is not empty
837837 promises . push ( addMemoryEntry ( this ) ) ;
838838
839- // This empties the event buffer regardless of outcome of sending replay
840- promises . push ( this . eventBuffer . finish ( ) ) ;
841-
842839 // NOTE: Copy values from instance members, as it's possible they could
843840 // change before the flush finishes.
844841 const replayId = this . session . id ;
@@ -865,7 +862,10 @@ export class ReplayContainer implements ReplayContainerInterface {
865862
866863 // NOTE: Be mindful that nothing after this point (the first `await`)
867864 // 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 ( ) ;
869869
870870 const sendReplayPromise = sendReplay ( {
871871 replayId,
You can’t perform that action at this time.
0 commit comments