From 704c4062df7a606a1649fc4bb5c09e8bf7f0322a Mon Sep 17 00:00:00 2001 From: Jared Stoffan Date: Tue, 10 Nov 2020 11:39:17 -0800 Subject: [PATCH] feat(controls): Add check for page controls in document viewers --- src/lib/viewers/doc/DocBaseViewer.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/lib/viewers/doc/DocBaseViewer.js b/src/lib/viewers/doc/DocBaseViewer.js index 5babd6e61..47fa14344 100644 --- a/src/lib/viewers/doc/DocBaseViewer.js +++ b/src/lib/viewers/doc/DocBaseViewer.js @@ -1298,7 +1298,10 @@ class DocBaseViewer extends BaseViewer { */ pagechangingHandler(event) { const { pageNumber } = event; - this.pageControls.updateCurrentPage(pageNumber); + + if (this.pageControls) { + this.pageControls.updateCurrentPage(pageNumber); + } if (this.thumbnailsSidebar) { this.thumbnailsSidebar.setCurrentPage(pageNumber);