Skip to content

Commit

Permalink
browser: fix 'fetchTumbnail' property if exists
Browse files Browse the repository at this point in the history
if "options.fetchThmbail" is set to false, it should check
if property exist rather than the value

Change-Id: I4b10d0af9309c85526dd887216e6c12ca1d59812
Signed-off-by: Henry Castro <[email protected]>
  • Loading branch information
hcvcastro committed Nov 4, 2024
1 parent 98ec3d2 commit 3ed9cba
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions browser/src/control/Parts.js
Original file line number Diff line number Diff line change
Expand Up @@ -215,8 +215,8 @@ L.Map.include({
this._docPreviews = {};
}
var autoUpdate = options ? !!options.autoUpdate : false;
var fetchThumbnail = options && options.fetchThumbnail ? options.fetchThumbnail : true;
var isSlideshow = options && options.slideshow ? options.slideshow : false;
var fetchThumbnail = options && typeof options.fetchThumbnail !== 'undefined' ? options.fetchThumbnail : true;
var isSlideshow = options && typeof options.slideshow !== 'undefined' ? options.slideshow : false;
this._docPreviews[id] = {id: id, index: index, maxWidth: maxWidth, maxHeight: maxHeight, autoUpdate: autoUpdate, invalid: false};

var docLayer = this._docLayer;
Expand Down

0 comments on commit 3ed9cba

Please sign in to comment.