@sentry/replay 7.53.0 → 7.53.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/cjs/index.js CHANGED
@@ -7059,7 +7059,9 @@ class ReplayContainer {
7059
7059
  this._debouncedFlush.cancel();
7060
7060
  // See comment above re: `_isEnabled`, we "force" a flush, ignoring the
7061
7061
  // `_isEnabled` state of the plugin since it was disabled above.
7062
- await this._flush({ force: true });
7062
+ if (this.recordingMode === 'session') {
7063
+ await this._flush({ force: true });
7064
+ }
7063
7065
 
7064
7066
  // After flush, destroy event buffer
7065
7067
  this.eventBuffer && this.eventBuffer.destroy();