fix register on dev

main
Mike Fix 3 years ago
parent e002c6b289
commit 3aef99b033
No known key found for this signature in database
GPG Key ID: 1D85E862314CA79F

@ -10,7 +10,9 @@ import { MetaLinks } from '../components/Meta'
class Index extends React.Component { class Index extends React.Component {
componentDidMount() { componentDidMount() {
window.workbox.register() if (window.workbox && window.workbox.register) {
window.workbox.register()
}
} }
componentWillUnmount() { componentWillUnmount() {
if ('serviceWorker' in navigator) { if ('serviceWorker' in navigator) {

Loading…
Cancel
Save