mirror of
https://github.com/mozilla/pdf.js.git
synced 2026-02-07 16:11:12 +01:00
Merge pull request #20503 from andriivitiv/Fix-Worker-was-terminated-error
Fix `Worker was terminated` error when loading is cancelled
This commit is contained in:
commit
58ac273f1f
@ -319,7 +319,9 @@ class WorkerMessageHandler {
|
||||
}
|
||||
|
||||
function onFailure(ex) {
|
||||
ensureNotTerminated();
|
||||
if (terminated) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (ex instanceof PasswordException) {
|
||||
const task = new WorkerTask(`PasswordException: response ${ex.code}`);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user