fix sw not registered

This commit is contained in:
William Blythe
2018-10-23 11:56:33 +11:00
parent d52365a204
commit 3215b3942d

View File

@@ -344,7 +344,6 @@ export default class Coriolis extends React.Component {
});
}
if ('serviceWorker' in navigator) {
window.addEventListener('load', () => {
// Your service-worker.js *must* be located at the top-level directory relative to your site.
// It won't be able to control pages unless it's located at the same level or higher than them.
// *Don't* register service worker file in, e.g., a scripts/ sub-directory!
@@ -374,7 +373,6 @@ export default class Coriolis extends React.Component {
console.error('Error during service worker registration:', error)
}
});
});
}
window.onerror = this._onError.bind(this);
window.addEventListener('resize', () => this.emitter.emit('windowResize'));