We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a641820 commit 2845efeCopy full SHA for 2845efe
src/index.ts
@@ -324,7 +324,7 @@ function resolveInput(input: string): string {
324
if (canParseURL(input)) return input;
325
326
// Window context
327
- if (typeof window.document !== 'undefined') {
+ if (typeof window !== 'undefined' && typeof window.document !== 'undefined') {
328
return new URL(input, window.document.baseURI).toString();
329
}
330
0 commit comments