Baoyuantop commented on code in PR #13065:
URL: https://github.com/apache/apisix/pull/13065#discussion_r2892959454


##########
apisix/core/table.lua:
##########
@@ -174,10 +174,13 @@ local function merge(origin, extend)
     for k,v in pairs(extend) do
         if type(v) == "table" then
             if type(origin[k] or false) == "table" then
-                if _M.nkeys(origin[k]) ~= #origin[k] then
-                    merge(origin[k] or {}, extend[k] or {})
-                else
+                local origin_is_array = _M.nkeys(origin[k]) == #origin[k]
+                local extend_is_array = _M.nkeys(v) == #v

Review Comment:
   It is recommended to use table.isarray



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to