mirror of
https://github.com/CommunityOx/ox_lib.git
synced 2026-08-17 06:56:03 +01:00
- The previous fix (commit df7a6b9) mistakenly left in a table.type
/ #t1 == #t2 check that breaks equality for {} and {x=nil}.
- This removes that leftover check, restoring the intended deep
equality semantics.
Signed-off-by: RuksH4n <77233680+rukshanchamindu@users.noreply.github.com>
This commit is contained in:
@@ -52,10 +52,6 @@ local function table_matches(t1, t2)
|
|||||||
if type1 ~= type2 then return false end
|
if type1 ~= type2 then return false end
|
||||||
if type1 ~= 'table' and type2 ~= 'table' then return t1 == t2 end
|
if type1 ~= 'table' and type2 ~= 'table' then return t1 == t2 end
|
||||||
|
|
||||||
if tabletype1 ~= table.type(t2) or (tabletype1 == 'array' and #t1 ~= #t2) then
|
|
||||||
return false
|
|
||||||
end
|
|
||||||
|
|
||||||
for k, v1 in pairs(t1) do
|
for k, v1 in pairs(t1) do
|
||||||
local v2 = t2[k]
|
local v2 = t2[k]
|
||||||
if v2 == nil or not table_matches(v1, v2) then
|
if v2 == nil or not table_matches(v1, v2) then
|
||||||
|
|||||||
Reference in New Issue
Block a user