From f9d26b88a8399a889909a7b89f08a3016cadce31 Mon Sep 17 00:00:00 2001 From: tamaina Date: Thu, 11 Feb 2021 17:14:16 +0900 Subject: [PATCH] fix debug --- src/client/sw/sw.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/client/sw/sw.ts b/src/client/sw/sw.ts index 43e9afd9c8..e50a82f1bc 100644 --- a/src/client/sw/sw.ts +++ b/src/client/sw/sw.ts @@ -111,7 +111,7 @@ self.addEventListener('notificationclose', ev => { const { notification } = ev; if (notification.title !== 'notificationclose') { - self.registration.showNotification('notificationclose', { body: `${notification.data.body.id}` }); + self.registration.showNotification('notificationclose', { body: `${notification?.data?.body?.id}` }); } const data: pushNotificationData = notification.data;