mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-20 15:18:08 +02:00
Ensure that failing to open the password dialog once won't permanently disable it (PR 15335 follow-up)
*Please note:* This situation should never happen in practice, but it nonetheless cannot hurt to fix this. If the `PasswordPrompt.open` method would ever be called synchronously back-to-back *and* if opening of the dialog fails the first time, then the second invocation would remain pending indefinitely since we just clear out the capability.
This commit is contained in:
parent
7ae5a0fef7
commit
81dfa61777
1 changed files with 1 additions and 1 deletions
|
@ -74,7 +74,7 @@ class PasswordPrompt {
|
|||
try {
|
||||
await this.overlayManager.open(this.dialog);
|
||||
} catch (ex) {
|
||||
this.#activeCapability = null;
|
||||
this.#activeCapability.resolve();
|
||||
throw ex;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue