From 806a44c107092eb19be6cc377fa3271be993897f Mon Sep 17 00:00:00 2001 From: bat Date: Wed, 3 May 2023 07:10:19 +0000 Subject: [PATCH] use correct reference to registration --- app.js | 4 ++-- sw.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app.js b/app.js index 7550c23..4c1d543 100644 --- a/app.js +++ b/app.js @@ -70,8 +70,8 @@ class Setup { '/sw.js', {scope: '/'} ) - if (registration.waiting) { - registration.active.postMessage(['skipWaiting']) + if (this.registration.waiting) { + this.registration.active.postMessage(['skipWaiting']) } } catch (err) { console.error( diff --git a/sw.js b/sw.js index b26cfbe..b20653b 100644 --- a/sw.js +++ b/sw.js @@ -25,7 +25,7 @@ async function initCache() { '/settings/connections.js', '/settings/connection-edit.js', '/editor-lib-codemirror/codemirror-bundle.js', - ]) + ]) //1 } self.addEventListener("install", event => {