fix(graph): avoid repeatedly child of the same parent

This commit is contained in:
ernisto 2025-03-23 23:11:09 -03:00
parent c078bd8022
commit 21ed76f9e0

View file

@ -72,6 +72,7 @@ local function assert_stable_scope(): Node<unknown>
end end
local function push_child<T>(parent: SourceNode<any>, child: Node<any>) local function push_child<T>(parent: SourceNode<any>, child: Node<any>)
if table.find(child.parents, parent) then return end
table.insert(parent, child) table.insert(parent, child)
table.insert(child.parents, parent) table.insert(child.parents, parent)
end end