catch caches is not defined
This commit is contained in:
@@ -53,7 +53,7 @@ browser.runtime.onStartup.addListener(async () => {
|
|||||||
try {
|
try {
|
||||||
caches.delete(CACHE_NAME);
|
caches.delete(CACHE_NAME);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.log("[clean caches]", err);
|
console.log("[clean caches]", err.message);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -129,7 +129,7 @@ export const fetchData = async (
|
|||||||
const cache = await caches.open(CACHE_NAME);
|
const cache = await caches.open(CACHE_NAME);
|
||||||
res = await cache.match(cacheReq);
|
res = await cache.match(cacheReq);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.log("[cache match]", err);
|
console.log("[cache match]", err.message);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -151,7 +151,7 @@ export const fetchData = async (
|
|||||||
const cache = await caches.open(CACHE_NAME);
|
const cache = await caches.open(CACHE_NAME);
|
||||||
await cache.put(cacheReq, res.clone());
|
await cache.put(cacheReq, res.clone());
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.log("[cache put]", err);
|
console.log("[cache put]", err.message);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user