Skip to content

Commit 11144e4

Browse files
authored
fix: support web workers loading for jsonp format
1 parent b6c781a commit 11144e4

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/web/JsonpChunkLoadingRuntimeModule.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ class JsonpChunkLoadingRuntimeModule extends RuntimeModule {
6969
if (options && options.baseUri) {
7070
return `${RuntimeGlobals.baseURI} = ${JSON.stringify(options.baseUri)};`;
7171
}
72-
return `${RuntimeGlobals.baseURI} = (document && document.baseURI) || self.location.href;`;
72+
return `${RuntimeGlobals.baseURI} = (typeof document !== 'undefined' && document.baseURI) || self.location.href;`;
7373
}
7474

7575
/**

0 commit comments

Comments
 (0)