Skip to content

Commit 1dad8cd

Browse files
authored
fix: assign location.host only if self is available in debuggerWorker.js (#680)
1 parent d96d95d commit 1dad8cd

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

packages/haul-core/assets/debuggerWorker.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,10 @@ class DebuggerWorker {
120120

121121
let error;
122122
const scriptURL = new URL(message.url);
123-
scriptURL.host = self.location.host;
123+
if (typeof self !== 'undefined' && self.location) {
124+
scriptURL.host = self.location.host;
125+
}
126+
124127
try {
125128
importScripts(scriptURL.href);
126129
} catch (e) {

0 commit comments

Comments
 (0)