forked from mystiq/hydrogen-web
don't assume the thumbnail was cached already
This commit is contained in:
parent
e0c8be3a9a
commit
9708e394a0
1 changed files with 1 additions and 1 deletions
|
@ -140,7 +140,7 @@ async function readCache(request) {
|
||||||
const mediaThumbnailCache = await caches.open(mediaThumbnailCacheName);
|
const mediaThumbnailCache = await caches.open(mediaThumbnailCacheName);
|
||||||
response = await mediaThumbnailCache.match(request);
|
response = await mediaThumbnailCache.match(request);
|
||||||
// added in 0.1.26, remove previously cached error responses, remove this in some time
|
// 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);
|
await mediaThumbnailCache.delete(request);
|
||||||
response = null;
|
response = null;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue