mirror of
https://github.com/nocobase/nocobase
synced 2024-11-15 14:26:36 +00:00
fix(plugin-workflow-loop): fix condition checking (#5634)
This commit is contained in:
parent
e42c480d85
commit
3f86115f84
@ -111,6 +111,8 @@ export default class extends Instruction {
|
||||
job.set({ result: { looped: nextIndex } });
|
||||
await processor.saveJob(job);
|
||||
|
||||
const length = getTargetLength(target);
|
||||
if (nextIndex < length) {
|
||||
if (loop.config.condition) {
|
||||
const { calculation, expression, continueOnFalse } = loop.config.condition ?? {};
|
||||
if (calculation || expression) {
|
||||
@ -124,10 +126,6 @@ export default class extends Instruction {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const length = getTargetLength(target);
|
||||
if (nextIndex < length) {
|
||||
await processor.saveJob(job);
|
||||
await processor.run(branch, job);
|
||||
return processor.exit();
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user