fix: skip removal of notifications if pwa not enabled
parent
f0c91a3974
commit
80ad2ab607
|
@ -96,6 +96,9 @@ export async function loginTo(user?: Omit<UserLogin, 'account'> & { account?: Ac
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function removePushNotifications(user: UserLogin, fromSWPushManager = true) {
|
export async function removePushNotifications(user: UserLogin, fromSWPushManager = true) {
|
||||||
|
if (!useRuntimeConfig().public.pwaEnabled || !user.pushSubscription)
|
||||||
|
return
|
||||||
|
|
||||||
// unsubscribe push notifications
|
// unsubscribe push notifications
|
||||||
try {
|
try {
|
||||||
await useMasto().pushSubscriptions.remove()
|
await useMasto().pushSubscriptions.remove()
|
||||||
|
|
Loading…
Reference in New Issue