From a575f92ad1a1691a59311b380601c9e5e29b04b5 Mon Sep 17 00:00:00 2001
From: Eliot Berriot <contact@eliotberriot.com>
Date: Thu, 9 Jan 2020 14:08:56 +0100
Subject: [PATCH] Update service worker on load

---
 front/src/registerServiceWorker.js | 1 +
 1 file changed, 1 insertion(+)

diff --git a/front/src/registerServiceWorker.js b/front/src/registerServiceWorker.js
index 92311b4d..9e689f5b 100644
--- a/front/src/registerServiceWorker.js
+++ b/front/src/registerServiceWorker.js
@@ -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();
-- 
GitLab