From c3986172d5e39bbd61761ca0cb2fad694c8ea9b0 Mon Sep 17 00:00:00 2001 From: awsr <43862868+awsr@users.noreply.github.com> Date: Sat, 29 Nov 2025 01:09:43 -0800 Subject: [PATCH] Don't run on error --- javascript/gallery.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/javascript/gallery.js b/javascript/gallery.js index 05c8e15b4..fcad81a74 100644 --- a/javascript/gallery.js +++ b/javascript/gallery.js @@ -629,7 +629,7 @@ async function thumbCacheCleanup(folder, imgCount) { const t0 = performance.now(); const staticGalleryHashes = new Set(galleryHashes); const cachedHashesCount = await idbCount(folder) - .catch(() => 0); + .catch(() => Infinity); // Forces next check to fail if something went wrong if (cachedHashesCount < staticGalleryHashes.size + 500) { // Don't run when there aren't many excess entries return;