Remove custom offline text (#2007)
We need the handler to be recognized as a PWA but we can just let the original offline browser message show instead of our own message. See #1925 and #1979.
This commit is contained in:
parent
eebb8bb314
commit
a839da34d7
|
@ -8,17 +8,6 @@ self.addEventListener("activate", (event: any) => {
|
|||
event.waitUntil((self as any).clients.claim())
|
||||
})
|
||||
|
||||
self.addEventListener("fetch", (event: any) => {
|
||||
if (!navigator.onLine) {
|
||||
event.respondWith(
|
||||
new Promise((resolve) => {
|
||||
resolve(
|
||||
new Response("OFFLINE", {
|
||||
status: 200,
|
||||
statusText: "OK",
|
||||
}),
|
||||
)
|
||||
}),
|
||||
)
|
||||
}
|
||||
self.addEventListener("fetch", () => {
|
||||
// Without this event handler we won't be recognized as a PWA.
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue