mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-19 22:58:07 +02:00
Merge pull request #11308 from Snuffleupagus/abortOperatorList-assert
Prevent browser exceptions from incorrectly triggering the `assert` in `PDFPageProxy._abortOperatorList` (PR 11069 follow-up)
This commit is contained in:
commit
668650d564
1 changed files with 2 additions and 1 deletions
|
@ -1378,7 +1378,8 @@ class PDFPageProxy {
|
|||
* @private
|
||||
*/
|
||||
_abortOperatorList({ intentState, reason, force = false, }) {
|
||||
assert(reason instanceof Error,
|
||||
assert(reason instanceof Error ||
|
||||
(typeof reason === 'object' && reason !== null),
|
||||
'PDFPageProxy._abortOperatorList: Expected "reason" argument.');
|
||||
|
||||
if (!intentState.streamReader) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue