Skip to content
This repository was archived by the owner on Sep 21, 2021. It is now read-only.

Commit d5b12dd

Browse files
Guard against null worker in /devtools-utils/src/worker-utils.js
1 parent d479565 commit d5b12dd

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

packages/devtools-utils/src/worker-utils.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,10 @@ WorkerDispatcher.prototype = {
5454
const items = calls.slice();
5555
calls.length = 0;
5656

57+
if (!this.worker) {
58+
return;
59+
}
60+
5761
const id = this.msgId++;
5862
this.worker.postMessage({ id, method, calls: items.map(item => item[0]) });
5963

0 commit comments

Comments
 (0)