2 Commits

Author SHA1 Message Date
917e630554 1.0.6 2020-01-23 15:12:55 +00:00
b3b02fee70 fix(core): update 2020-01-23 15:12:55 +00:00
3 changed files with 6 additions and 4 deletions

2
package-lock.json generated
View File

@@ -1,6 +1,6 @@
{
"name": "@pushrocks/smartrule",
"version": "1.0.5",
"version": "1.0.6",
"lockfileVersion": 1,
"requires": true,
"dependencies": {

View File

@@ -1,6 +1,6 @@
{
"name": "@pushrocks/smartrule",
"version": "1.0.5",
"version": "1.0.6",
"private": false,
"description": "a smart rule library for handling decision trees.",
"main": "dist/index.js",

View File

@@ -26,7 +26,7 @@ export class SmartRule<T> {
};
// lets run the checks
const runNextBatch = async (startPriority: number) => {
const runNextBatch = async (startPriority: number): Promise<void> => {
const nextBatch = getNextParallelBatch(0);
const outcomes: TTreeActionResult[] = [];
for (const rule of nextBatch) {
@@ -51,7 +51,9 @@ export class SmartRule<T> {
}
if (startPriority < this.rules[this.rules.length-1].priority) {
runNextBatch(startPriority++);
await runNextBatch(startPriority++);
} else {
return;
}
};