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;