diff --git a/composables/users.ts b/composables/users.ts index b59a93be..d06647d9 100644 --- a/composables/users.ts +++ b/composables/users.ts @@ -96,6 +96,9 @@ export async function loginTo(user?: Omit & { account?: Ac } export async function removePushNotifications(user: UserLogin, fromSWPushManager = true) { + if (!useRuntimeConfig().public.pwaEnabled || !user.pushSubscription) + return + // unsubscribe push notifications try { await useMasto().pushSubscriptions.remove()