Skip to content

Commit 0c976af

Browse files
committed
Fix missing location error
1 parent 0b60b3a commit 0c976af

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/util/url.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ export function resolve(from: string, to: string) {
4444
* @returns
4545
*/
4646
export function cwd() {
47-
if (typeof window !== "undefined") {
47+
if (typeof window !== "undefined" && typeof location !== "undefined") {
4848
return location.href;
4949
}
5050

0 commit comments

Comments
 (0)