fix filter with lua 5.2 no longer using a userdata proxy for objects

This commit is contained in:
Daniel Kolesa 2020-05-31 08:05:31 +02:00
parent b8b91215f1
commit 9f8b605cd2
1 changed files with 1 additions and 1 deletions

View File

@ -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