1
0
Fork 0
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:
Jonas Jenwald 2020-06-21 11:29:05 +02:00
parent 8cfdfb237a
commit a04a5d8325

View file

@ -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);
}
}