summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sw.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/sw.js b/sw.js
index 3f03425..58317c0 100644
--- a/sw.js
+++ b/sw.js
@@ -43,7 +43,7 @@ self.addEventListener("activate", evt => {
);
});
-self.addEventListener("fetch", (evt) => {
+self.addEventListener("fetch", (event) => {
if (event.request.mode === 'navigate' || // tole ni povsod podprto, zato
( (event.request.method === 'GET' || // če je GET
event.request.method === 'POST') // ali POST zahteva
@@ -53,8 +53,8 @@ self.addEventListener("fetch", (evt) => {
return cacches.match(offlineUrl);
}));
} else { // zahteva je za nek resource (css/js/img), ne za stran
- evt.respondWith(caches.match(evt.request).then((cache_res) => {
- return cache_res || fetch(evt.request);
+ event.respondWith(caches.match(event.request).then((cache_res) => {
+ return cache_res || fetch(event.request);
}))
}
});