Commit 1b9e8771 authored by Guillermo Rauch's avatar Guillermo Rauch

Revert "Add a way to disable running service workers. (#1167)"

This reverts commit d8af41d6.
parent 59726866
...@@ -10,16 +10,6 @@ import { loadGetInitialProps, getLocationOrigin } from '../utils' ...@@ -10,16 +10,6 @@ import { loadGetInitialProps, getLocationOrigin } from '../utils'
// Add "fetch" polyfill for older browsers // Add "fetch" polyfill for older browsers
if (typeof window !== 'undefined') { if (typeof window !== 'undefined') {
require('whatwg-fetch') require('whatwg-fetch')
// Unregister if there's an exisiting service worker.
// This is because we ship a service worker in previous version.
// We don't use it and having a already running worker might cause issues.
// (We can remove this in future releases)
navigator.serviceWorker.getRegistrations()
.then((registrations) => {
for (let registration of registrations) {
registration.unregister()
}
})
} }
export default class Router extends EventEmitter { export default class Router extends EventEmitter {
......
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