@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.
- package/dist/lib/util/url.js +2 -2
- package/lib/util/url.ts +2 -2
- package/package.json +1 -1
package/dist/lib/util/url.js
CHANGED
|
@@ -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) {
|