skeletons: only create leaves for additions

This commit is contained in:
Emery Hemingway 2022-08-29 09:50:12 -05:00
parent 6701fdb1c7
commit 831b7194a9
1 changed files with 1 additions and 1 deletions

View File

@ -110,7 +110,7 @@ proc modify(node: Node; turn: var Turn; outerValue: Value; event: EventKind;
for constPaths, constValMap in cont.leafMap.pairs:
let constVals = projectPaths(outerValue, constPaths)
var leaf = constValMap.getOrDefault(constVals)
if leaf.isNil: # and event == addedEvent:
if leaf.isNil and event == addedEvent:
new leaf
constValMap[constVals] = leaf
if not leaf.isNil: