From 76f5e1c6404c8ce5c7427ba3b8fd22fabb5afae9 Mon Sep 17 00:00:00 2001 From: sealday Date: Thu, 6 Jun 2024 14:29:21 +0800 Subject: [PATCH] fix: notifiedPerson length (#1137) Reviewed-on: https://git.daoyoucloud.com/daoyoucloud/tachybase/pulls/1137 --- .../plugin-workflow-notice/src/server/NoticeInstruction.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/plugins/@tachybase/plugin-workflow-notice/src/server/NoticeInstruction.ts b/packages/plugins/@tachybase/plugin-workflow-notice/src/server/NoticeInstruction.ts index dc19a01ac..6682ce719 100644 --- a/packages/plugins/@tachybase/plugin-workflow-notice/src/server/NoticeInstruction.ts +++ b/packages/plugins/@tachybase/plugin-workflow-notice/src/server/NoticeInstruction.ts @@ -15,7 +15,7 @@ class NoticeInstruction extends Instruction { upstreamId: prevJob?.id ?? null, }); const notifiedPerson = await parsePerson(node, processor); - if (notifiedPerson) { + if (notifiedPerson && notifiedPerson.length > 0) { const { db } = processor.options.plugin; // TODO-A: 改成取上一个节点的数据集, 或者当前执行流数据源的数据集, 目前是对审批事件做了特化处理; 需要理解下其他类型的触发事件, 怎么拿数据 const ApprovalRepo = db.getRepository('approvals');