From b3b02fee702ba931b5d7abdc4be9fb0207e8c971 Mon Sep 17 00:00:00 2001 From: Phil Kunz Date: Thu, 23 Jan 2020 15:12:55 +0000 Subject: [PATCH] fix(core): update --- ts/smartrule.classes.smartrule.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ts/smartrule.classes.smartrule.ts b/ts/smartrule.classes.smartrule.ts index b721a18..4fecfb6 100644 --- a/ts/smartrule.classes.smartrule.ts +++ b/ts/smartrule.classes.smartrule.ts @@ -26,7 +26,7 @@ export class SmartRule { }; // lets run the checks - const runNextBatch = async (startPriority: number) => { + const runNextBatch = async (startPriority: number): Promise => { const nextBatch = getNextParallelBatch(0); const outcomes: TTreeActionResult[] = []; for (const rule of nextBatch) { @@ -51,7 +51,9 @@ export class SmartRule { } if (startPriority < this.rules[this.rules.length-1].priority) { - runNextBatch(startPriority++); + await runNextBatch(startPriority++); + } else { + return; } };