fix(core): update

This commit is contained in:
Philipp Kunz 2020-01-23 15:11:29 +00:00
parent 7d08f9bdf6
commit a4ff5c26e2

View File

@ -35,17 +35,19 @@ 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) {
if (current.includes('continue') || previous.includes('continue')) { const finalOutcomeOfBatch: TTreeActionResult = outcomes.reduce((previous, current, index, array) => {
return 'continue'; if (current.includes('continue') || previous.includes('continue')) {
} else { return 'continue';
return 'stop'; } else {
return 'stop';
}
});
if (finalOutcomeOfBatch === 'stop') {
return;
} }
});
if (finalOutcome === 'stop') {
return;
} }
if (startPriority < this.rules[this.rules.length-1].priority) { if (startPriority < this.rules[this.rules.length-1].priority) {