We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent de56e04 commit f11d97bCopy full SHA for f11d97b
packages/replay/src/replay.ts
@@ -802,13 +802,19 @@ export class ReplayContainer implements ReplayContainerInterface {
802
803
await this._addPerformanceEntries();
804
805
- if (!this.eventBuffer.pendingLength) {
+ // Check eventBuffer again, as it could have been stopped in the meanwhile
806
+ if (!this.eventBuffer || !this.eventBuffer.pendingLength) {
807
return;
808
}
809
810
// Only attach memory event if eventBuffer is not empty
811
await addMemoryEntry(this);
812
813
814
+ if (!this.eventBuffer) {
815
+ return;
816
+ }
817
+
818
try {
819
// Note this empties the event buffer regardless of outcome of sending replay
820
const recordingData = await this.eventBuffer.finish();
0 commit comments