fix(core): update
This commit is contained in:
parent
7d08f9bdf6
commit
a4ff5c26e2
@ -35,18 +35,20 @@ export class SmartRule<T> {
|
|||||||
await rule.actionFunction(objectArg);
|
await rule.actionFunction(objectArg);
|
||||||
}
|
}
|
||||||
outcomes.push(checkResult);
|
outcomes.push(checkResult);
|
||||||
};
|
}
|
||||||
|
|
||||||
const finalOutcome: TTreeActionResult = outcomes.reduce((previous, current, index, array) => {
|
if (outcomes.length > 0) {
|
||||||
|
const finalOutcomeOfBatch: TTreeActionResult = outcomes.reduce((previous, current, index, array) => {
|
||||||
if (current.includes('continue') || previous.includes('continue')) {
|
if (current.includes('continue') || previous.includes('continue')) {
|
||||||
return 'continue';
|
return 'continue';
|
||||||
} else {
|
} else {
|
||||||
return 'stop';
|
return 'stop';
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
if (finalOutcome === 'stop') {
|
if (finalOutcomeOfBatch === 'stop') {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (startPriority < this.rules[this.rules.length-1].priority) {
|
if (startPriority < this.rules[this.rules.length-1].priority) {
|
||||||
runNextBatch(startPriority++);
|
runNextBatch(startPriority++);
|
||||||
|
Loading…
Reference in New Issue
Block a user