mirror of
https://github.com/paricafe/misskey.git
synced 2024-11-24 07:06:44 -06:00
lint
This commit is contained in:
parent
0145477c96
commit
600a978f22
1 changed files with 195 additions and 195 deletions
|
@ -20,7 +20,7 @@ async function cacheWithFallback(cache, paths) {
|
||||||
try {
|
try {
|
||||||
await cache.add(new Request(path, { credentials: 'same-origin' }));
|
await cache.add(new Request(path, { credentials: 'same-origin' }));
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
// eslint-disable-next-line no-empty
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -66,7 +66,7 @@ globalThis.addEventListener('fetch', (ev) => {
|
||||||
if (response) return response;
|
if (response) return response;
|
||||||
|
|
||||||
return fetch(ev.request).then((response) => {
|
return fetch(ev.request).then((response) => {
|
||||||
if (!response || response.status !== 200 || response.type !== 'basic') return response;
|
if (response.status !== 200 || response.type !== 'basic') return response;
|
||||||
const responseToCache = response.clone();
|
const responseToCache = response.clone();
|
||||||
caches.open(STATIC_CACHE_NAME)
|
caches.open(STATIC_CACHE_NAME)
|
||||||
.then((cache) => {
|
.then((cache) => {
|
||||||
|
|
Loading…
Reference in a new issue