Skip to content

Commit

Permalink
fix(test): Fix possible sanity test bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Mingze Xiao committed Dec 13, 2019
1 parent 7472809 commit 71aa369
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/lib/ThumbnailsSidebar.js
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,10 @@ class ThumbnailsSidebar {
* @return {Promise} - promise reolves with the image HTMLElement or null if generation is in progress
*/
createThumbnailImage(itemIndex) {
if (!this.thumbnailImageCache) {
return Promise.resolve(null);
}

const cacheEntry = this.thumbnailImageCache.get(itemIndex);

// If this thumbnail has already been cached, use it
Expand Down

0 comments on commit 71aa369

Please sign in to comment.