Perhaps need to be inside waitUntil block?

This commit is contained in:
Lim Chee Aun 2023-10-15 23:50:37 +08:00
parent 7e1bb08b1b
commit 54e69ed23b

View file

@ -163,9 +163,9 @@ self.addEventListener('notificationclick', (event) => {
const { access_token, notification_type } = data; const { access_token, notification_type } = data;
const url = `/#/notifications?id=${tag}&access_token=${btoa(access_token)}`; const url = `/#/notifications?id=${tag}&access_token=${btoa(access_token)}`;
event.notification.close();
event.waitUntil( event.waitUntil(
(async () => { (async () => {
await event.notification.close();
const clients = await self.clients.matchAll({ const clients = await self.clients.matchAll({
type: 'window', type: 'window',
includeUncontrolled: true, includeUncontrolled: true,