mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-19 22:58:07 +02:00
Merge pull request #9182 from Snuffleupagus/viewer-ignore-other-file-errors
Don't display error messages, in the default viewer, for PDF files other than the current one
This commit is contained in:
commit
c236790fb4
1 changed files with 4 additions and 0 deletions
|
@ -759,6 +759,10 @@ let PDFViewerApplication = {
|
|||
return loadingTask.promise.then((pdfDocument) => {
|
||||
this.load(pdfDocument);
|
||||
}, (exception) => {
|
||||
if (loadingTask !== this.pdfLoadingTask) {
|
||||
return; // Ignore errors for previously opened PDF files.
|
||||
}
|
||||
|
||||
let message = exception && exception.message;
|
||||
let loadingErrorMessage;
|
||||
if (exception instanceof InvalidPDFException) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue