diff --git a/packages/plugins/@nocobase/plugin-workflow/src/server/instructions/condition.ts b/packages/plugins/@nocobase/plugin-workflow/src/server/instructions/condition.ts index dba5482c4..a0fcd33c3 100644 --- a/packages/plugins/@nocobase/plugin-workflow/src/server/instructions/condition.ts +++ b/packages/plugins/@nocobase/plugin-workflow/src/server/instructions/condition.ts @@ -149,7 +149,9 @@ export default { upstreamId: (prevJob && prevJob.id) || null, }; - const branchNode = processor.nodes.find((item) => item.upstream === node && Boolean(item.branchIndex) === result); + const branchNode = processor.nodes.find( + (item) => item.upstreamId === node.id && item.branchIndex != null && Boolean(item.branchIndex) === result, + ); if (!branchNode) { return job;