From 119dae29ca54cdb552814912ba7898a92984ed1c Mon Sep 17 00:00:00 2001 From: Lim Chee Aun Date: Mon, 16 Oct 2023 21:38:14 +0800 Subject: [PATCH] Try move this down --- public/sw.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/sw.js b/public/sw.js index 2c0e2a0..e47c2cd 100644 --- a/public/sw.js +++ b/public/sw.js @@ -165,7 +165,6 @@ self.addEventListener('notificationclick', (event) => { event.waitUntil( (async () => { - await event.notification.close(); const clients = await self.clients.matchAll({ type: 'window', includeUncontrolled: true, @@ -195,6 +194,7 @@ self.addEventListener('notificationclick', (event) => { console.log('NOTIFICATION CLICK openWindow', url); await self.clients.openWindow(url); } + await event.notification.close(); })(), ); });