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:
Tim van der Meij 2017-11-23 21:58:33 +01:00 committed by GitHub
commit c236790fb4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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) {