1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-29 07:37:57 +02:00

Introduce even more optional chaining in the code-base

This replaces a few more small/simple if-statements with optional chaining.
This commit is contained in:
Jonas Jenwald 2023-08-09 17:03:25 +02:00
parent f89020e9b1
commit ec7746350d
3 changed files with 7 additions and 12 deletions

View file

@ -546,9 +546,8 @@ class ChunkedStreamManager {
abort(reason) {
this.aborted = true;
if (this.pdfNetworkStream) {
this.pdfNetworkStream.cancelAllRequests(reason);
}
this.pdfNetworkStream?.cancelAllRequests(reason);
for (const capability of this._promisesByRequest.values()) {
capability.reject(reason);
}