@syntrologie/runtime-sdk 2.6.0 → 2.7.0-canary.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.
@@ -3358,7 +3358,7 @@ function getAntiFlickerSnippet(config = {}) {
3358
3358
  }
3359
3359
 
3360
3360
  // src/version.ts
3361
- var SDK_VERSION = "2.6.0";
3361
+ var SDK_VERSION = "2.7.0-canary.2";
3362
3362
 
3363
3363
  // src/types.ts
3364
3364
  var SDK_SCHEMA_VERSION = "2.0";
@@ -9623,15 +9623,10 @@ var StateStore = class {
9623
9623
  __publicField(this, "namespacedStorages", /* @__PURE__ */ new Map());
9624
9624
  var _a2;
9625
9625
  this.namespace = (_a2 = options.namespace) != null ? _a2 : DEFAULT_NAMESPACE;
9626
+ const isUsable = (s) => typeof s === "object" && s !== null && typeof s.setItem === "function";
9626
9627
  if (typeof window !== "undefined") {
9627
- this.session = createBrowserStorage(
9628
- typeof sessionStorage !== "undefined" ? sessionStorage : void 0,
9629
- this.namespace
9630
- );
9631
- this.user = createBrowserStorage(
9632
- typeof localStorage !== "undefined" ? localStorage : void 0,
9633
- this.namespace
9634
- );
9628
+ this.session = isUsable(window.sessionStorage) ? createBrowserStorage(window.sessionStorage, this.namespace) : createMemoryStorage(this.namespace);
9629
+ this.user = isUsable(window.localStorage) ? createBrowserStorage(window.localStorage, this.namespace) : createMemoryStorage(this.namespace);
9635
9630
  } else {
9636
9631
  this.session = createMemoryStorage(this.namespace);
9637
9632
  this.user = createMemoryStorage(this.namespace);
@@ -11374,4 +11369,4 @@ export {
11374
11369
  encodeToken,
11375
11370
  Syntro
11376
11371
  };
11377
- //# sourceMappingURL=chunk-KETP7BVG.js.map
11372
+ //# sourceMappingURL=chunk-JKKV6QXE.js.map