mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-10 02:05:37 +02:00
Merge pull request #13822 from Snuffleupagus/ReadableStreams-cancel-no-Uncaught_promise
Prevent "Uncaught promise" messages in the console when cancelling (some) `ReadableStream`s
This commit is contained in:
commit
67f4c34f63
2 changed files with 12 additions and 5 deletions
|
@ -1772,7 +1772,11 @@ class PDFPageProxy {
|
|||
return;
|
||||
}
|
||||
}
|
||||
intentState.streamReader.cancel(new AbortException(reason?.message));
|
||||
intentState.streamReader
|
||||
.cancel(new AbortException(reason?.message))
|
||||
.catch(() => {
|
||||
// Avoid "Uncaught promise" messages in the console.
|
||||
});
|
||||
intentState.streamReader = null;
|
||||
|
||||
if (this._transport.destroyed) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue