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,8 +10,10 @@ import { MetaLinks } from '../components/Meta'
class Index extends React.Component { class Index extends React.Component {
componentDidMount() { componentDidMount() {
if (window.workbox && window.workbox.register) {
window.workbox.register() window.workbox.register()
} }
}
componentWillUnmount() { componentWillUnmount() {
if ('serviceWorker' in navigator) { if ('serviceWorker' in navigator) {
navigator.serviceWorker.ready.then(registration => { navigator.serviceWorker.ready.then(registration => {

Loading…
Cancel
Save