mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-26 01:58:06 +02:00
Tweak the loop in ChunkedStreamManager.abort
to clarify what's being iterated (PR 11985 follow-up)
In hindsight, using the `for (let [key, value] of myMap) { ... }`-format when we don't care about the `key` probably wasn't such a great idea. Since `Map`s have explicit support for iterating either `key`s or `value`s, we should probably use that instead here.
This commit is contained in:
parent
8cfdfb237a
commit
a04a5d8325
1 changed files with 1 additions and 1 deletions
|
@ -591,7 +591,7 @@ class ChunkedStreamManager {
|
|||
if (this.pdfNetworkStream) {
|
||||
this.pdfNetworkStream.cancelAllRequests(reason);
|
||||
}
|
||||
for (const [, capability] of this._promisesByRequest) {
|
||||
for (const capability of this._promisesByRequest.values()) {
|
||||
capability.reject(reason);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue