fix #1945
This commit is contained in:
parent
b03e02e4cf
commit
4dd9088f25
@ -31,6 +31,10 @@ self.addEventListener('install', () => self.skipWaiting())
|
|||||||
// Also, the offline fallback only works if request matched a route
|
// Also, the offline fallback only works if request matched a route
|
||||||
setDefaultHandler(new NetworkOnly({
|
setDefaultHandler(new NetworkOnly({
|
||||||
plugins: [{
|
plugins: [{
|
||||||
|
fetchDidFail: async (args) => {
|
||||||
|
// tell us why a request failed in dev
|
||||||
|
// process.env.NODE_ENV !== 'production' && console.log('fetch did fail', ...args)
|
||||||
|
},
|
||||||
fetchDidSucceed: async ({ request, response, event, state }) => {
|
fetchDidSucceed: async ({ request, response, event, state }) => {
|
||||||
if (
|
if (
|
||||||
response.ok &&
|
response.ok &&
|
||||||
|
Loading…
x
Reference in New Issue
Block a user