fix: promo cancels not working.

This commit is contained in:
ItzNotABug committed 2024-10-03 13:24:15 +05:30
1 parent 79f620eed2
commit 511a4c6227
1 file changed
+2 -1
+2 -1
View File
@@ -18,7 +18,8 @@ const userPreferences = () => get(user).prefs;
const notificationPrefs = (): Record<string, NotificationPrefItem> => {
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<string, NotificationPrefItem>) {