mirror of
https://codeberg.org/vlw/victorwesterlund.com.git
synced 2025-09-14 11:33:41 +02:00
Update sw.js
This commit is contained in:
parent
0c954479b4
commit
b9ffba4f71
1 changed files with 1 additions and 5 deletions
|
@ -62,11 +62,7 @@ self.addEventListener("fetch", event => {
|
|||
// Get pattern.gif from generator. Fallback to cache on failure
|
||||
if(origin && url.pathname.endsWith("pattern.gif")) {
|
||||
const pattern = new Request(`${location.origin}${root}assets/img/pattern.php`);
|
||||
event.respondWith(
|
||||
fetch(pattern).catch(() => {
|
||||
return caches.match(root + "assets/img/pattern.gif");
|
||||
})
|
||||
);
|
||||
event.respondWith(fetch(pattern).catch(() => caches.match(root + "assets/img/pattern.gif")));
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue