fix filter with lua 5.2 no longer using a userdata proxy for objects
This commit is contained in:
parent
b8b91215f1
commit
9f8b605cd2
|
@ -49,7 +49,7 @@ end
|
|||
|
||||
M.filter = function(list, pred)
|
||||
local ret = {}
|
||||
if type(list) == "table" then
|
||||
if type(list) == "table" and getmetatable(list) == nil then
|
||||
for i, v in ipairs(list) do
|
||||
if pred(v) then
|
||||
ret[#ret + 1] = v
|
||||
|
|
Loading…
Reference in New Issue