refactor deepComparison

This commit is contained in:
neckrat 2026-04-23 22:11:15 +03:00
parent 77f5a2abdc
commit 8cbaf643ab

View File

@ -81,9 +81,8 @@ end
function P.deepComparison(t1, t2)
for k, v in pairs(t1) do
if type(v) == "table" and type(t2[k]) == "table" then
return P.deepComparison(v, t2[k])
end
if t2[k] ~= v then
if not P.deepComparison(v, t2[k]) then return false end
elseif t2[k] ~= v then
return false
end
end