@bbearai/core 0.5.2 → 0.5.3

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/index.js CHANGED
@@ -114,7 +114,7 @@ var ContextCaptureManager = class {
114
114
  if (this.navigationHistory.length > 0) {
115
115
  return this.navigationHistory[this.navigationHistory.length - 1];
116
116
  }
117
- if (typeof window !== "undefined") {
117
+ if (typeof window !== "undefined" && window.location) {
118
118
  return window.location.pathname;
119
119
  }
120
120
  return "unknown";
@@ -226,7 +226,7 @@ var ContextCaptureManager = class {
226
226
  };
227
227
  }
228
228
  captureNavigation() {
229
- if (typeof window === "undefined" || typeof history === "undefined") return;
229
+ if (typeof window === "undefined" || typeof history === "undefined" || !window.location) return;
230
230
  this.trackNavigation(window.location.pathname);
231
231
  const self = this;
232
232
  this.originalPushState = history.pushState;
package/dist/index.mjs CHANGED
@@ -80,7 +80,7 @@ var ContextCaptureManager = class {
80
80
  if (this.navigationHistory.length > 0) {
81
81
  return this.navigationHistory[this.navigationHistory.length - 1];
82
82
  }
83
- if (typeof window !== "undefined") {
83
+ if (typeof window !== "undefined" && window.location) {
84
84
  return window.location.pathname;
85
85
  }
86
86
  return "unknown";
@@ -192,7 +192,7 @@ var ContextCaptureManager = class {
192
192
  };
193
193
  }
194
194
  captureNavigation() {
195
- if (typeof window === "undefined" || typeof history === "undefined") return;
195
+ if (typeof window === "undefined" || typeof history === "undefined" || !window.location) return;
196
196
  this.trackNavigation(window.location.pathname);
197
197
  const self = this;
198
198
  this.originalPushState = history.pushState;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bbearai/core",
3
- "version": "0.5.2",
3
+ "version": "0.5.3",
4
4
  "description": "Core utilities and types for BugBear QA platform",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",