Better checks

This commit is contained in:
Lim Chee Aun 2024-08-02 13:42:43 +08:00
parent 4937c5f77e
commit cf2461add5

View file

@ -29,8 +29,12 @@ export function fixNotifications(notifications) {
}
export function massageNotifications2(notifications) {
if (notifications?.accounts) {
const { accounts, notificationGroups, statuses } = notifications;
if (notifications?.notificationGroups) {
const {
accounts = [],
notificationGroups = [],
statuses = [],
} = notifications;
return notificationGroups.map((group) => {
const { sampleAccountIds, statusId } = group;
const sampleAccounts =