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