@cfworker/json-schema 1.12.5 → 1.12.6

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.
@@ -54,7 +54,9 @@ export const ignoredKeyword = {
54
54
  maxProperties: true,
55
55
  minProperties: true
56
56
  };
57
- export let initialBaseURI = typeof self !== 'undefined' && self.location
57
+ export let initialBaseURI = typeof self !== 'undefined' &&
58
+ self.location &&
59
+ self.location.origin !== 'null'
58
60
  ?
59
61
  new URL(self.location.origin + self.location.pathname + location.search)
60
62
  : new URL('https://github.com/cfworker');
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cfworker/json-schema",
3
3
  "type": "module",
4
- "version": "1.12.5",
4
+ "version": "1.12.6",
5
5
  "description": "A JSON schema validator that will run on Cloudflare workers. Supports drafts 4, 7, 2019-09, and 2020-12.",
6
6
  "keywords": [
7
7
  "json-schema",
@@ -67,7 +67,9 @@ export const ignoredKeyword: Record<string, boolean> = {
67
67
  */
68
68
  export let initialBaseURI =
69
69
  // @ts-ignore
70
- typeof self !== 'undefined' && self.location
70
+ typeof self !== 'undefined' &&
71
+ self.location &&
72
+ self.location.origin !== 'null'
71
73
  ? //@ts-ignore
72
74
  new URL(self.location.origin + self.location.pathname + location.search)
73
75
  : new URL('https://github.com/cfworker');