Error fetching fetch on ServiceWorkerGlobalScope

0

After upgrading to chrome 64, I noticed that this error appears on the console, whenever I load a page in a new tab.

I can not identify where it is in the service worker. Here is my code when running fetch:

self.addEventListener('fetch', function(event) {

    //Evento somente para mesma origem;
    if (event.request.url.startsWith(self.location.origin)) {
        event.respondWith(
            caches.match(event.request).then(function(response) {
                return response || fetch(event.request).then(function(fetch_resp){
                    return fetch_resp;
                });
           })
        );
     }
});

Does anyone here who has more knowledge about service worker help me?

    
asked by anonymous 26.01.2018 / 15:18

0 answers