summaryrefslogtreecommitdiff
path: root/src/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'src/scripts')
-rw-r--r--src/scripts/service-worker.js7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/scripts/service-worker.js b/src/scripts/service-worker.js
index e6d2a5a..2911784 100644
--- a/src/scripts/service-worker.js
+++ b/src/scripts/service-worker.js
@@ -26,7 +26,10 @@ const assets = [
self.addEventListener("install", installEvent => {
installEvent.waitUntil(
caches.open(staticQuran).then(cache => {
- cache.addAll(assets)
+ for (var i = 0; i < assets.length; i++)
+ {
+ cache.add(assets[i]);
+ }
})
)
})
@@ -34,7 +37,7 @@ self.addEventListener("install", installEvent => {
self.addEventListener("fetch", fetchEvent => {
fetchEvent.respondWith(
caches.match(fetchEvent.request).then(res => {
- return res || fetch(fetchEvent.request)
+ return res || fetch(fetchEvent.request);
})
)
}) \ No newline at end of file