mirror of
https://github.com/appwrite/console.git
synced 2026-11-18 20:47:21 +00:00
fix: prefs empty array case
This commit is contained in:
1 parent
ac7b527260
commit
6c39ed22a3
1 file changed
+1
-1
@@ -24,7 +24,7 @@ const notificationPrefs = (): Record<string, NotificationPrefItem> => {
|
||||
}
|
||||
|
||||
// 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<string, NotificationPrefItem>) {
|
||||
|
||||
Reference in new issue
Block a user