diff --git a/javascript/gallery.js b/javascript/gallery.js index 70969e0f7..722a2909b 100644 --- a/javascript/gallery.js +++ b/javascript/gallery.js @@ -520,7 +520,7 @@ class GalleryFile extends HTMLElement { this.height = json.height; this.size = json.size; this.mtime = new Date(json.mtime); - if (opts.browser_cache) { + if (opts.browser_cache && this.hash) { await idbAdd({ hash: this.hash, folder: this.fullFolder,