@statsig/session-replay 3.24.2 → 3.24.4

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@statsig/session-replay",
3
- "version": "3.24.2",
3
+ "version": "3.24.4",
4
4
  "license": "ISC",
5
5
  "homepage": "https://github.com/statsig-io/js-client-monorepo",
6
6
  "repository": {
@@ -10,7 +10,7 @@
10
10
  },
11
11
  "dependencies": {
12
12
  "rrweb": "2.0.0-alpha.14",
13
- "@statsig/client-core": "3.24.2"
13
+ "@statsig/client-core": "3.24.4"
14
14
  },
15
15
  "devDependencies": {
16
16
  "@rrweb/types": "2.0.0-alpha.14"
@@ -140,7 +140,11 @@ class SessionReplayBase {
140
140
  _shutdownImpl(endReason) {
141
141
  if (this._replayer.isRecording()) {
142
142
  this._replayer.stop();
143
- client_core_1.StatsigMetadataProvider.add({ isRecordingSession: 'false' });
143
+ const handler = () => {
144
+ client_core_1.StatsigMetadataProvider.add({ isRecordingSession: 'false' });
145
+ this._client.off('logs_flushed', handler);
146
+ };
147
+ this._client.$on('logs_flushed', handler);
144
148
  }
145
149
  if (this._events.length === 0) {
146
150
  // only reset if session expired otherwise we might start recording again