diff --git a/web/src/index.tsx b/web/src/index.tsx index 2a71542e..7b5225e2 100644 --- a/web/src/index.tsx +++ b/web/src/index.tsx @@ -16,4 +16,9 @@ ReactDOM.render(, document.getElementById('root')); // If you want your app to work offline and load faster, you can change // unregister() to register() below. Note this comes with some pitfalls. // Learn more about service workers: https://cra.link/PWA -serviceWorkerRegistration.register(); +serviceWorkerRegistration.register({ + onUpdate: (registration) => { + registration.update() + .catch(err => console.error('Failed to check updates: ', err)) + } +});