From a8a4b90d4ebe5c93459b02be473b42304255a6ac Mon Sep 17 00:00:00 2001 From: Artyom Savchenko Date: Mon, 17 Nov 2025 12:39:34 +0700 Subject: [PATCH] Fix value.every is not a function (#10213) Signed-off-by: Artem Savchenko --- server-plugins/notification-resources/src/index.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/server-plugins/notification-resources/src/index.ts b/server-plugins/notification-resources/src/index.ts index c7ad799ff3..9df493219e 100644 --- a/server-plugins/notification-resources/src/index.ts +++ b/server-plugins/notification-resources/src/index.ts @@ -256,8 +256,12 @@ async function getValueCollaborators (value: any, attr: AnyAttribute, control: T if (arrOf._class === core.class.RefTo) { const to = (arrOf as RefTo).to if (hierarchy.isDerived(to, contact.class.Person)) { + if (!Array.isArray(value)) { + control.ctx.error('Expected array but got non-array value when getting value collaborators', { attr, value }) + return [] + } if (value.length === 0) return [] - if ((value as any[]).every((it) => it === null)) { + if (value.every((it) => it === null)) { control.ctx.error('Null-values array of person refs when getting value collaborators', { attr, value }) }