refactor deepComparison
This commit is contained in:
parent
77f5a2abdc
commit
8cbaf643ab
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user