From 0c976af409aaba08a18589df9daf700561f8ccf1 Mon Sep 17 00:00:00 2001 From: Alexander Holland Date: Fri, 6 Jun 2025 01:42:12 +0200 Subject: [PATCH] Fix missing location error --- lib/util/url.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; }