@openreplay/tracker 15.0.1 → 15.0.2

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/dist/cjs/index.js CHANGED
@@ -4648,7 +4648,7 @@ class App {
4648
4648
  this.stopCallbacks = [];
4649
4649
  this.commitCallbacks = [];
4650
4650
  this.activityState = ActivityState.NotActive;
4651
- this.version = '15.0.1'; // TODO: version compatability check inside each plugin.
4651
+ this.version = '15.0.2'; // TODO: version compatability check inside each plugin.
4652
4652
  this.socketMode = false;
4653
4653
  this.compressionThreshold = 24 * 1000;
4654
4654
  this.bc = null;
@@ -9046,7 +9046,7 @@ function processOptions(obj) {
9046
9046
  }
9047
9047
  const canAccessTop = () => {
9048
9048
  try {
9049
- return Boolean(window.top);
9049
+ return Boolean(window.top?.document);
9050
9050
  }
9051
9051
  catch {
9052
9052
  return false;
@@ -9069,7 +9069,7 @@ class API {
9069
9069
  const orig = this.options.ingestPoint || DEFAULT_INGEST_POINT;
9070
9070
  req.open('POST', orig + '/v1/web/not-started');
9071
9071
  req.send(JSON.stringify({
9072
- trackerVersion: '15.0.1',
9072
+ trackerVersion: '15.0.2',
9073
9073
  projectKey: this.options.projectKey,
9074
9074
  doNotTrack,
9075
9075
  reason: missingApi.length ? `missing api: ${missingApi.join(',')}` : reason,
@@ -9102,7 +9102,7 @@ class API {
9102
9102
  return;
9103
9103
  }
9104
9104
  if (window.__OPENREPLAY__ ||
9105
- (!this.crossdomainMode && inIframe() && canAccessTop() && window.top?.__OPENREPLAY__)) {
9105
+ (!this.crossdomainMode && inIframe() && canAccessTop() && window.top.__OPENREPLAY__)) {
9106
9106
  console.error('OpenReplay: one tracker instance has been initialised already');
9107
9107
  return;
9108
9108
  }