mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-19 14:48:08 +02:00
Merge pull request #5127 from Hengjie/fix-pdfdocument-null
Fix issue where pdfDocument is null
This commit is contained in:
commit
87de3cd2ec
2 changed files with 5 additions and 3 deletions
|
@ -101,7 +101,9 @@ var SecondaryToolbar = {
|
|||
},
|
||||
|
||||
lastPageClick: function secondaryToolbarLastPageClick(evt) {
|
||||
PDFView.page = PDFView.pdfDocument.numPages;
|
||||
if (PDFView.pdfDocument) {
|
||||
PDFView.page = PDFView.pdfDocument.numPages;
|
||||
}
|
||||
this.close();
|
||||
},
|
||||
|
||||
|
|
|
@ -2376,8 +2376,8 @@ window.addEventListener('keydown', function keydown(evt) {
|
|||
}
|
||||
break;
|
||||
case 35: // end
|
||||
if (PresentationMode.active ||
|
||||
PDFView.page < PDFView.pdfDocument.numPages) {
|
||||
if (PresentationMode.active || (PDFView.pdfDocument &&
|
||||
PDFView.page < PDFView.pdfDocument.numPages)) {
|
||||
PDFView.page = PDFView.pdfDocument.numPages;
|
||||
handled = true;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue