From 9708e394a042ba6ccf1f75ec869a3dfca1cd7f57 Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Thu, 5 Nov 2020 22:45:20 +0100 Subject: [PATCH] don't assume the thumbnail was cached already --- src/platform/web/service-worker.template.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/platform/web/service-worker.template.js b/src/platform/web/service-worker.template.js index 689f6d00..bc894b90 100644 --- a/src/platform/web/service-worker.template.js +++ b/src/platform/web/service-worker.template.js @@ -140,7 +140,7 @@ async function readCache(request) { const mediaThumbnailCache = await caches.open(mediaThumbnailCacheName); response = await mediaThumbnailCache.match(request); // added in 0.1.26, remove previously cached error responses, remove this in some time - if (response.status >= 400) { + if (response?.status >= 400) { await mediaThumbnailCache.delete(request); response = null; }