From 6085dfdfe28b86d27c01b8dfced43849dc33c75b Mon Sep 17 00:00:00 2001 From: thepaperpilot Date: Thu, 8 Dec 2022 19:31:36 -0600 Subject: [PATCH] Fixed PWAs not showing updates --- src/main.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main.ts b/src/main.ts index 503b599..ce97d73 100644 --- a/src/main.ts +++ b/src/main.ts @@ -70,7 +70,8 @@ requestAnimationFrame(async () => { onRegisterError: console.warn, onRegistered(r) { if (r) { - setInterval(r.update, 60 * 60 * 1000); + // https://stackoverflow.com/questions/65500916/typeerror-failed-to-execute-update-on-serviceworkerregistration-illegal-in + setInterval(() => r.update(), 60 * 60 * 1000); } } });