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 {
802802
803803 await this . _addPerformanceEntries ( ) ;
804804
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 ) {
806807 return ;
807808 }
808809
809810 // Only attach memory event if eventBuffer is not empty
810811 await addMemoryEntry ( this ) ;
811812
813+ // Check eventBuffer again, as it could have been stopped in the meanwhile
814+ if ( ! this . eventBuffer ) {
815+ return ;
816+ }
817+
812818 try {
813819 // Note this empties the event buffer regardless of outcome of sending replay
814820 const recordingData = await this . eventBuffer . finish ( ) ;
You can’t perform that action at this time.
0 commit comments