mirror of
https://github.com/TangentFoxy/lume.git
synced 2024-11-19 07:04:24 +00:00
Fixed nil iterator in internal getiter()
This commit is contained in:
parent
c565f0739b
commit
ce86f4b0ea
6
lume.lua
6
lume.lua
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user