Skip to content

Commit

Permalink
Fix: Avoid adding thumbnail sidebar classes if option is disabled (#990)
Browse files Browse the repository at this point in the history
  • Loading branch information
jstoffan authored Apr 18, 2019
1 parent ce3e834 commit c5eac30
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/lib/viewers/doc/DocBaseViewer.js
Original file line number Diff line number Diff line change
Expand Up @@ -1453,6 +1453,10 @@ class DocBaseViewer extends BaseViewer {
* @return {boolean} Whether thumbnails should be toggled open or not
*/
shouldThumbnailsBeToggled() {
if (!this.options.enableThumbnailsSidebar) {
return false;
}

const cachedToggledState = this.getCachedThumbnailsToggledState();
// `pdfViewer.pagesCount` isn't immediately available after pdfViewer.setDocument()
// is called, but the numPages is available on the underlying pdfViewer.pdfDocument
Expand Down

0 comments on commit c5eac30

Please sign in to comment.