Commit 4a069e9d authored by Arunoda Susiripala's avatar Arunoda Susiripala Committed by Leo Lamprecht

Remove Service Worker unregister code. (#1568)

We don't need to do it now. Because, any running service workers
might have stopped by now.
parent d32e69ee
...@@ -9,25 +9,6 @@ import { _notifyBuildIdMismatch } from './' ...@@ -9,25 +9,6 @@ import { _notifyBuildIdMismatch } from './'
const webpackModule = module const webpackModule = module
if (typeof window !== 'undefined' && typeof navigator.serviceWorker !== 'undefined') {
navigator.serviceWorker.getRegistrations()
.then(registrations => {
registrations.forEach(registration => {
if (!registration.active) {
return
}
if (registration.active.scriptURL.indexOf('_next-prefetcher.js') === -1) {
return
}
console.warn(`Unregistered deprecated 'next/prefetch' ServiceWorker. See https://github.com/zeit/next.js#prefetching-pages`)
registration.unregister()
})
})
.catch(() => {})
}
export default class Router { export default class Router {
constructor (pathname, query, as, { Component, ErrorComponent, err } = {}) { constructor (pathname, query, as, { Component, ErrorComponent, err } = {}) {
// represents the current component key // represents the current component key
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment