consistentcy and bugfix

This commit is contained in:
Henry Jameson 2023-11-19 13:54:26 +02:00
parent c216340001
commit a564fc1a1f
2 changed files with 3 additions and 3 deletions

View File

@ -150,7 +150,7 @@ export const notifications = {
id,
credentials: rootState.users.currentUser.credentials
}).then(() => {
closeDesktopNotification(rootState, id)
closeDesktopNotification(rootState, { id })
})
},
dismissNotificationLocal ({ rootState, commit }, { id }) {

View File

@ -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({})
}
}