Offline response
This commit is contained in:
parent
7427b4c839
commit
b24c41c777
1 changed files with 4 additions and 1 deletions
|
@ -46,7 +46,10 @@ self.addEventListener('activate', ev => {
|
|||
|
||||
//#region When: Fetching
|
||||
self.addEventListener('fetch', ev => {
|
||||
// Nothing to do
|
||||
ev.respondWith(
|
||||
fetch(ev.request)
|
||||
.catch(() => new Response(`Offline. Service Worker @${version}`, { status: 200 }))
|
||||
);
|
||||
});
|
||||
//#endregion
|
||||
|
||||
|
|
Loading…
Reference in a new issue