don't assume the thumbnail was cached already

This commit is contained in:
Bruno Windels 2020-11-05 22:45:20 +01:00
parent e0c8be3a9a
commit 9708e394a0

View file

@ -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;
}