diff --git a/src/lib/helpers/notifications.ts b/src/lib/helpers/notifications.ts index 306a80995..e5f9ae143 100644 --- a/src/lib/helpers/notifications.ts +++ b/src/lib/helpers/notifications.ts @@ -18,7 +18,8 @@ const userPreferences = () => get(user).prefs; const notificationPrefs = (): Record => { const prefs = userPreferences(); - return prefs.notificationPrefs ? prefs.notificationPrefs : {}; + // for some reason, the prefs become array as default or on all clear. let's reset. + return Array.isArray(prefs.notificationPrefs) ? {} : prefs.notificationPrefs || {}; }; function updateNotificationPrefs(parsedPrefs: Record) {