fix(resolve): record correct name when becomes rule removes label
This commit is contained in:
parent
445a0abc97
commit
0cd176d789
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue