@apidevtools/json-schema-ref-parser 13.0.2 → 13.0.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.
@@ -90,8 +90,8 @@ function resolve(from, to) {
90
90
  * @returns
91
91
  */
92
92
  function cwd() {
93
- if (typeof window !== "undefined" && window.location) {
94
- return location.href;
93
+ if (typeof window !== "undefined" && window.location && window.location.href) {
94
+ return window.location.href;
95
95
  }
96
96
  if (typeof process !== "undefined" && process.cwd) {
97
97
  const path = process.cwd();
package/lib/util/url.ts CHANGED
@@ -44,8 +44,8 @@ export function resolve(from: string, to: string) {
44
44
  * @returns
45
45
  */
46
46
  export function cwd() {
47
- if (typeof window !== "undefined" && window.location) {
48
- return location.href;
47
+ if (typeof window !== "undefined" && window.location && window.location.href) {
48
+ return window.location.href;
49
49
  }
50
50
 
51
51
  if (typeof process !== "undefined" && process.cwd) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@apidevtools/json-schema-ref-parser",
3
- "version": "13.0.2",
3
+ "version": "13.0.3",
4
4
  "description": "Parse, Resolve, and Dereference JSON Schema $ref pointers",
5
5
  "scripts": {
6
6
  "prepublishOnly": "yarn build",