From 54e69ed23bf8652412c359bcd01f6e4ab4ad3b36 Mon Sep 17 00:00:00 2001 From: Lim Chee Aun Date: Sun, 15 Oct 2023 23:50:37 +0800 Subject: [PATCH] Perhaps need to be inside waitUntil block? --- public/sw.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/sw.js b/public/sw.js index fe6d0fe6..2c0e2a03 100644 --- a/public/sw.js +++ b/public/sw.js @@ -163,9 +163,9 @@ self.addEventListener('notificationclick', (event) => { const { access_token, notification_type } = data; const url = `/#/notifications?id=${tag}&access_token=${btoa(access_token)}`; - event.notification.close(); event.waitUntil( (async () => { + await event.notification.close(); const clients = await self.clients.matchAll({ type: 'window', includeUncontrolled: true,