From 0cd176d789f66c9561c56f75352558d6f93b7492 Mon Sep 17 00:00:00 2001 From: ssube Date: Sun, 30 Aug 2020 17:32:28 -0500 Subject: [PATCH] fix(resolve): record correct name when becomes rule removes label --- src/resolve.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/resolve.ts b/src/resolve.ts index 600f207..dfd9a77 100644 --- a/src/resolve.ts +++ b/src/resolve.ts @@ -119,14 +119,16 @@ function resolveBecomes(label: BaseLabel, anticipatedResult: ResolveResult, acti if (activeLabels.delete(label.name)) { anticipatedResult.changes.push({ - cause: name, + cause: label.name, effect: ChangeVerb.REMOVED, - label: name, + label: label.name, }); } + return true; } } + return false; } @@ -142,6 +144,7 @@ function resolveState(state: StateLabel, anticipatedResult: ResolveResult, activ const sortedValues = prioritySort(state.values); for (const value of sortedValues) { const name = getValueName(state, value); + if (!activeLabels.has(name)) { continue; }