1
0
Fork 0

fix(resolve): record correct name when becomes rule removes label

This commit is contained in:
ssube 2020-08-30 17:32:28 -05:00
parent 445a0abc97
commit 0cd176d789
Signed by: ssube
GPG Key ID: 3EED7B957D362AF1
1 changed files with 5 additions and 2 deletions

View File

@ -119,14 +119,16 @@ function resolveBecomes(label: BaseLabel, anticipatedResult: ResolveResult, acti
if (activeLabels.delete(label.name)) { if (activeLabels.delete(label.name)) {
anticipatedResult.changes.push({ anticipatedResult.changes.push({
cause: name, cause: label.name,
effect: ChangeVerb.REMOVED, effect: ChangeVerb.REMOVED,
label: name, label: label.name,
}); });
} }
return true; return true;
} }
} }
return false; return false;
} }
@ -142,6 +144,7 @@ function resolveState(state: StateLabel, anticipatedResult: ResolveResult, activ
const sortedValues = prioritySort(state.values); const sortedValues = prioritySort(state.values);
for (const value of sortedValues) { for (const value of sortedValues) {
const name = getValueName(state, value); const name = getValueName(state, value);
if (!activeLabels.has(name)) { if (!activeLabels.has(name)) {
continue; continue;
} }