From 06b1f619c6ca1b10c14e1ea96bb56515fb347083 Mon Sep 17 00:00:00 2001 From: Jonas Jenwald Date: Wed, 4 Dec 2019 13:38:07 +0100 Subject: [PATCH] Fix an incorrect condition in `BaseViewer.isPageVisible` (PR 10217 follow-up) This was a blatant oversight in PR 10217, since there's obviously no `this.pageNumber` property anywhere in the `BaseViewer`. Luckily this shouldn't have caused any bugs, since the only call-site is also validating the `pageNumber` (but correctly that time). --- web/base_viewer.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/base_viewer.js b/web/base_viewer.js index 3fec6934be073..fb05d21f25ecc 100644 --- a/web/base_viewer.js +++ b/web/base_viewer.js @@ -935,7 +935,7 @@ class BaseViewer { if (!this.pdfDocument) { return false; } - if (this.pageNumber < 1 || pageNumber > this.pagesCount) { + if (pageNumber < 1 || pageNumber > this.pagesCount) { console.error( `${this._name}.isPageVisible: "${pageNumber}" is out of bounds.`); return false;