diff --git a/public/sw.js b/public/sw.js index 2c0e2a03..e47c2cdc 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(); })(), ); });