aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHenry Jameson <me@hjkos.com>2023-11-13 17:40:55 +0200
committerHenry Jameson <me@hjkos.com>2023-11-13 17:40:55 +0200
commitfffa7a4f4a7cb5659e830435508497c073b66160 (patch)
tree26473467a51fefda6834f7d0c378984dc5b0501e
parente508ca6a1f7d094c61f0717390317b216aaf415e (diff)
fix sw thing
-rw-r--r--src/sw.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/sw.js b/src/sw.js
index 43c1c2e2..f5fccc6a 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') {