Skip to content

armgit / macro

Public Imported from GitHub
0

Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.

fix(soup): read for notifications throwing error (#5123)

dev-rb3a09ba102c15
diff --git a/apps/web/src/features/next-soup/filters/predicates.ts b/apps/web/src/features/next-soup/filters/predicates.ts
index c7212ef130..d0ad7e4341 100644
--- a/apps/web/src/features/next-soup/filters/predicates.ts
+++ b/apps/web/src/features/next-soup/filters/predicates.ts
@@ -21,7 +21,12 @@ function getPredicateNotifications(
) {
const attachedNotifications = (entity as WithNotification<EntityData>)
.notifications;
- if (attachedNotifications) return attachedNotifications();
+
+ if (typeof attachedNotifications === 'function') {
+ return attachedNotifications();
+ }
+
+ if (Array.isArray(attachedNotifications)) return attachedNotifications;
return notificationSource.notificationsByEntity()[
compositeEntity(toNotificationEntity(entity))