fix(plugin-workflow): fix condition branch node finding logic (fix #3082) (#3128)

This commit is contained in:
Junyi 2023-12-02 13:32:43 +08:00 committed by GitHub
parent 7adb162cc8
commit 9bf3be222a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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;