From fffa7a4f4a7cb5659e830435508497c073b66160 Mon Sep 17 00:00:00 2001 From: Henry Jameson Date: Mon, 13 Nov 2023 17:40:55 +0200 Subject: [PATCH] fix sw thing --- src/sw.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/sw.js b/src/sw.js index 43c1c2e209..f5fccc6a96 100644 --- a/src/sw.js +++ b/src/sw.js @@ -69,7 +69,8 @@ self.addEventListener('message', async (event) => { if (type === 'desktopNotificationClose') { const { id, all } = content const search = all ? null : { tag: id } - self.registration.getNotifications(search).forEach(n => n.close()) + const notifications = await self.registration.getNotifications(search) + notifications.forEach(n => n.close()) } if (type === 'updateFocus') {