Skip to content

Commit b81b22c

Browse files
committed
Fix error when using <base> without URL
Related to cf92230.
1 parent 4e60c38 commit b81b22c

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lib/util/resolve.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,9 @@ function resolve(h, url) {
77
return ''
88
}
99

10-
return h.frozenBaseURL ? String(new URL(url, h.frozenBaseURL)) : url
10+
if (h.frozenBaseURL && typeof URL !== 'undefined') {
11+
return String(new URL(url, h.frozenBaseURL))
12+
}
13+
14+
return url
1115
}

0 commit comments

Comments
 (0)