UpUp
UpUp copied to clipboard
Please add error catch on this
line 60 of src/upup.sw.js
if (settings['assets']) {
cache.addAll(settings['assets'].map(function (urlToPrefetch) {
return new Request(urlToPrefetch, {mode: 'no-cors'});
}));
}
}
it throws Failed to fetch when offline
also line 93
}).then(function () {
// Delete old caches
return caches.keys().then(function (cacheNames) {
return Promise.all(
cacheNames.map(function (cacheName) {
if (cacheName.startsWith(_CACHE_NAME_PREFIX) && newCacheName !== cacheName) {
return caches.delete(cacheName);
}
})
);
});
})
please add error handling to avoid throwing errors
Thank you