mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-08 17:30:09 +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
|
@ -2533,11 +2533,9 @@ class WorkerTransport {
|
|||
this.#methodPromises.clear();
|
||||
this.filterFactory.destroy();
|
||||
|
||||
if (this._networkStream) {
|
||||
this._networkStream.cancelAllRequests(
|
||||
new AbortException("Worker was terminated.")
|
||||
);
|
||||
}
|
||||
this._networkStream?.cancelAllRequests(
|
||||
new AbortException("Worker was terminated.")
|
||||
);
|
||||
|
||||
if (this.messageHandler) {
|
||||
this.messageHandler.destroy();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue