Merge branch 'notifications-thru-sw' into shigusegubu-vue3
This commit is contained in:
commit
dcc57fc811
1 changed files with 2 additions and 1 deletions
|
@ -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') {
|
||||
|
|
Loading…
Add table
Reference in a new issue