Update service worker on load

This commit is contained in:
Eliot Berriot 2020-01-09 14:08:56 +01:00
parent 11376351df
commit a575f92ad1
No known key found for this signature in database
GPG Key ID: 6B501DFD73514E14
1 changed files with 1 additions and 0 deletions

View File

@ -16,6 +16,7 @@ if (process.env.NODE_ENV === 'production') {
// check for updates every 2 hours
var checkInterval = 1000 * 60 * 60 * 2
// var checkInterval = 1000 * 5
registration.update();
setInterval(() => {
console.log('Checking for service worker update…')
registration.update();