diff --git a/src/modules/notifications.js b/src/modules/notifications.js index 9bd38220..c1f5a63e 100644 --- a/src/modules/notifications.js +++ b/src/modules/notifications.js @@ -150,7 +150,7 @@ export const notifications = { id, credentials: rootState.users.currentUser.credentials }).then(() => { - closeDesktopNotification(rootState, id) + closeDesktopNotification(rootState, { id }) }) }, dismissNotificationLocal ({ rootState, commit }, { id }) { diff --git a/src/services/desktop_notification_utils/desktop_notification_utils.js b/src/services/desktop_notification_utils/desktop_notification_utils.js index bde9f18c..80b8c6e0 100644 --- a/src/services/desktop_notification_utils/desktop_notification_utils.js +++ b/src/services/desktop_notification_utils/desktop_notification_utils.js @@ -21,7 +21,7 @@ export const showDesktopNotification = (rootState, desktopNotificationOpts) => { } } -export const closeDesktopNotification = (rootState, id) => { +export const closeDesktopNotification = (rootState, { id }) => { if (!('Notification' in window && window.Notification.permission === 'granted')) return if (isSWSupported()) { @@ -33,6 +33,6 @@ export const closeAllDesktopNotifications = (rootState) => { if (!('Notification' in window && window.Notification.permission === 'granted')) return if (isSWSupported()) { - swCloseDesktopNotification() + swCloseDesktopNotification({}) } }