fix(core): update
This commit is contained in:
parent
9035fafdc2
commit
11921a2864
@ -32,6 +32,8 @@ export class SmartRule<T> {
|
|||||||
const outcomes: TTreeActionResult[] = [];
|
const outcomes: TTreeActionResult[] = [];
|
||||||
for (const rule of nextBatch) {
|
for (const rule of nextBatch) {
|
||||||
const checkResult = await rule.checkFunction(objectArg);
|
const checkResult = await rule.checkFunction(objectArg);
|
||||||
|
checkResult ? null : console.log('WARNING!!! Please make sure your rule always returns a statement of how to continue!');
|
||||||
|
|
||||||
if (checkResult.startsWith("apply")) {
|
if (checkResult.startsWith("apply")) {
|
||||||
await rule.actionFunction(objectArg); // here the action function is run
|
await rule.actionFunction(objectArg); // here the action function is run
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user