mirror of
https://github.com/centau/vide.git
synced 2026-08-20 14:41:37 +00:00
Fix edge case with map functions
This commit is contained in:
parent
44fe65ee5e
commit
e60aa57ca2
2 changed files with 52 additions and 29 deletions
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue