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:
parent
f89020e9b1
commit
ec7746350d
3 changed files with 7 additions and 12 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue