File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -802,13 +802,19 @@ export class ReplayContainer implements ReplayContainerInterface {
802
802
803
803
await this . _addPerformanceEntries ( ) ;
804
804
805
- if ( ! this . eventBuffer . pendingLength ) {
805
+ // Check eventBuffer again, as it could have been stopped in the meanwhile
806
+ if ( ! this . eventBuffer || ! this . eventBuffer . pendingLength ) {
806
807
return ;
807
808
}
808
809
809
810
// Only attach memory event if eventBuffer is not empty
810
811
await addMemoryEntry ( this ) ;
811
812
813
+ // Check eventBuffer again, as it could have been stopped in the meanwhile
814
+ if ( ! this . eventBuffer ) {
815
+ return ;
816
+ }
817
+
812
818
try {
813
819
// Note this empties the event buffer regardless of outcome of sending replay
814
820
const recordingData = await this . eventBuffer . finish ( ) ;
You can’t perform that action at this time.
0 commit comments