Fix edge case with map functions

This commit is contained in:
aaron 2024-11-27 19:43:51 +00:00
parent 44fe65ee5e
commit e60aa57ca2
2 changed files with 52 additions and 29 deletions

View file

@ -61,6 +61,8 @@ local function indexes<K, VI, VO>(input: () -> Map<K, VI>, transform: (() -> VI,
local cv = input_cache[i]
if cv ~= v then
input_cache[i] = v
if cv == nil then -- create new scope and run transform
local scope = create_node(subowner, false, false)
scopes[i] = scope :: Node<any>
@ -87,8 +89,6 @@ local function indexes<K, VI, VO>(input: () -> Map<K, VI>, transform: (() -> VI,
input_nodes[i].cache = v
update_descendants(input_nodes[i])
end
input_cache[i] = v
end
end