diff --git a/logging.lua b/logging.lua index 7ae6d32..7c12b5c 100644 --- a/logging.lua +++ b/logging.lua @@ -106,11 +106,11 @@ end local function cloneNonRecursive(value, sentinels) if type(value) == "table" then - local sentinel = RecursionSentinel.getSentinel(sentinels, value) if RecursionSentinel.isKnown(sentinels, value) then - return sentinel + return RecursionSentinel.getSentinel(sentinels, value) end + local sentinel = RecursionSentinel.getSentinel(sentinels, value) local clone = {} for i,v in ipairs(value) do clone[i] = cloneNonRecursive(v, sentinels)