Remove a couple of unnecessary pdfDocument
checks in web/app.js
These functions invoke the `PDFViewer.currentPageNumber` setter, which already checks that a `pdfDocument` is currently active. Also, given that they're event handlers for the First/Last-page buttons (in the SecondaryToolbar) they can't be invoked before the viewer has been fully initalized.
This commit is contained in:
parent
e698664927
commit
ea1ec7ffab
@ -2487,15 +2487,11 @@ function webViewerDownload() {
|
||||
PDFViewerApplication.downloadOrSave();
|
||||
}
|
||||
function webViewerFirstPage() {
|
||||
if (PDFViewerApplication.pdfDocument) {
|
||||
PDFViewerApplication.page = 1;
|
||||
}
|
||||
}
|
||||
function webViewerLastPage() {
|
||||
if (PDFViewerApplication.pdfDocument) {
|
||||
PDFViewerApplication.page = PDFViewerApplication.pagesCount;
|
||||
}
|
||||
}
|
||||
function webViewerNextPage() {
|
||||
PDFViewerApplication.pdfViewer.nextPage();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user