Fixed nil iterator in internal getiter()

This commit is contained in:
rxi 2015-01-10 17:08:14 +00:00
parent c565f0739b
commit ce86f4b0ea

View File

@ -46,9 +46,13 @@ local isarray = function(x)
return (x and x[1]) and true or false return (x and x[1]) and true or false
end end
local iternil = function()
return noop
end
local getiter = function(x) local getiter = function(x)
if x == nil then if x == nil then
return noop return iternil
elseif isarray(x) then elseif isarray(x) then
return ipairs return ipairs
else else