aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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') {