diff options
Diffstat (limited to 'js')
-rw-r--r-- | js/compiler.ts | 1 | ||||
-rw-r--r-- | js/workers.ts | 5 |
2 files changed, 4 insertions, 2 deletions
diff --git a/js/compiler.ts b/js/compiler.ts index 6172b614f..1a85de5f5 100644 --- a/js/compiler.ts +++ b/js/compiler.ts @@ -46,7 +46,6 @@ type SourceMap = string; interface CompilerLookup { specifier: ModuleSpecifier; referrer: ContainingFile; - isWorker: boolean; cmdId: number; } diff --git a/js/workers.ts b/js/workers.ts index 6b768bf08..456449d48 100644 --- a/js/workers.ts +++ b/js/workers.ts @@ -129,10 +129,13 @@ export async function workerMain(): Promise<void> { log("workerMain got null message. quitting."); break; } + if (window["onmessage"]) { const event = { data }; window.onmessage(event); - } else { + } + + if (!window["onmessage"]) { break; } } |