Skip to content

Commit 58ac273

Browse files
authored
Merge pull request #20503 from andriivitiv/Fix-Worker-was-terminated-error
Fix `Worker was terminated` error when loading is cancelled
2 parents b92bdf8 + 9677798 commit 58ac273

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/core/worker.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,9 @@ class WorkerMessageHandler {
319319
}
320320

321321
function onFailure(ex) {
322-
ensureNotTerminated();
322+
if (terminated) {
323+
return;
324+
}
323325

324326
if (ex instanceof PasswordException) {
325327
const task = new WorkerTask(`PasswordException: response ${ex.code}`);

0 commit comments

Comments
 (0)