Fix recursive tracking
This commit is contained in:
parent
053b59cf00
commit
9185d1dad4
@ -106,11 +106,11 @@ end
|
|||||||
|
|
||||||
local function cloneNonRecursive(value, sentinels)
|
local function cloneNonRecursive(value, sentinels)
|
||||||
if type(value) == "table" then
|
if type(value) == "table" then
|
||||||
local sentinel = RecursionSentinel.getSentinel(sentinels, value)
|
|
||||||
if RecursionSentinel.isKnown(sentinels, value) then
|
if RecursionSentinel.isKnown(sentinels, value) then
|
||||||
return sentinel
|
return RecursionSentinel.getSentinel(sentinels, value)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
local sentinel = RecursionSentinel.getSentinel(sentinels, value)
|
||||||
local clone = {}
|
local clone = {}
|
||||||
for i,v in ipairs(value) do
|
for i,v in ipairs(value) do
|
||||||
clone[i] = cloneNonRecursive(v, sentinels)
|
clone[i] = cloneNonRecursive(v, sentinels)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user