fix sw thing
This commit is contained in:
parent
e508ca6a1f
commit
fffa7a4f4a
@ -69,7 +69,8 @@ self.addEventListener('message', async (event) => {
|
|||||||
if (type === 'desktopNotificationClose') {
|
if (type === 'desktopNotificationClose') {
|
||||||
const { id, all } = content
|
const { id, all } = content
|
||||||
const search = all ? null : { tag: id }
|
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') {
|
if (type === 'updateFocus') {
|
||||||
|
Loading…
Reference in New Issue
Block a user