refactor deepComparison
This commit is contained in:
parent
77f5a2abdc
commit
8cbaf643ab
@ -81,9 +81,8 @@ end
|
|||||||
function P.deepComparison(t1, t2)
|
function P.deepComparison(t1, t2)
|
||||||
for k, v in pairs(t1) do
|
for k, v in pairs(t1) do
|
||||||
if type(v) == "table" and type(t2[k]) == "table" then
|
if type(v) == "table" and type(t2[k]) == "table" then
|
||||||
return P.deepComparison(v, t2[k])
|
if not P.deepComparison(v, t2[k]) then return false end
|
||||||
end
|
elseif t2[k] ~= v then
|
||||||
if t2[k] ~= v then
|
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user