From 9185d1dad47f1558d7a0d2b460962b2c9b23f8c5 Mon Sep 17 00:00:00 2001 From: Gabriel Tofvesson Date: Mon, 14 Oct 2024 13:03:44 +0200 Subject: [PATCH] Fix recursive tracking --- logging.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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)