diff --git a/lib/util/url.ts b/lib/util/url.ts index 33f483de..1c8552bf 100644 --- a/lib/util/url.ts +++ b/lib/util/url.ts @@ -44,7 +44,7 @@ export function resolve(from: string, to: string) { * @returns */ export function cwd() { - if (typeof window !== "undefined") { + if (typeof window !== "undefined" && typeof location !== "undefined") { return location.href; }