@uniformdev/context 19.190.1-alpha.5 → 19.190.1-alpha.7

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.esm.js CHANGED
@@ -1215,7 +1215,8 @@ var LocalStorage = class {
1215
1215
  this.partitionKey = partitionKey;
1216
1216
  __privateAdd(this, _LocalStorage_instances);
1217
1217
  __publicField(this, "inMemoryFallback", {});
1218
- __publicField(this, "hasLocalStorageObject", typeof localStorage !== "undefined");
1218
+ // deno implements localStorage in netlify edge workers, must also check if document is present.
1219
+ __publicField(this, "hasLocalStorageObject", typeof document !== "undefined" && typeof localStorage !== "undefined");
1219
1220
  }
1220
1221
  get(key) {
1221
1222
  const keyValue = __privateMethod(this, _LocalStorage_instances, key_fn).call(this, key);
package/dist/index.js CHANGED
@@ -1299,7 +1299,8 @@ var LocalStorage = class {
1299
1299
  this.partitionKey = partitionKey;
1300
1300
  __privateAdd(this, _LocalStorage_instances);
1301
1301
  __publicField(this, "inMemoryFallback", {});
1302
- __publicField(this, "hasLocalStorageObject", typeof localStorage !== "undefined");
1302
+ // deno implements localStorage in netlify edge workers, must also check if document is present.
1303
+ __publicField(this, "hasLocalStorageObject", typeof document !== "undefined" && typeof localStorage !== "undefined");
1303
1304
  }
1304
1305
  get(key) {
1305
1306
  const keyValue = __privateMethod(this, _LocalStorage_instances, key_fn).call(this, key);
package/dist/index.mjs CHANGED
@@ -1215,7 +1215,8 @@ var LocalStorage = class {
1215
1215
  this.partitionKey = partitionKey;
1216
1216
  __privateAdd(this, _LocalStorage_instances);
1217
1217
  __publicField(this, "inMemoryFallback", {});
1218
- __publicField(this, "hasLocalStorageObject", typeof localStorage !== "undefined");
1218
+ // deno implements localStorage in netlify edge workers, must also check if document is present.
1219
+ __publicField(this, "hasLocalStorageObject", typeof document !== "undefined" && typeof localStorage !== "undefined");
1219
1220
  }
1220
1221
  get(key) {
1221
1222
  const keyValue = __privateMethod(this, _LocalStorage_instances, key_fn).call(this, key);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uniformdev/context",
3
- "version": "19.190.1-alpha.5+e62509cf6f",
3
+ "version": "19.190.1-alpha.7+ac0e3943b6",
4
4
  "description": "Uniform Context core package",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "main": "./dist/index.js",
@@ -68,5 +68,5 @@
68
68
  "publishConfig": {
69
69
  "access": "public"
70
70
  },
71
- "gitHead": "e62509cf6f61000e1fde780921e4ea7ba8103ad5"
71
+ "gitHead": "ac0e3943b6b1b02b6076f3edf1337b65932f6ed5"
72
72
  }