mirror of
https://github.com/TangentFoxy/lume.git
synced 2024-11-19 07:04:24 +00:00
Substituted use of var name "arg" in lume.fn()
The use of a variable called "arg" was causing a bug in lume.fn() for lua5.1 which creates a table named "arg" when a variable number of arguments are used. The variable name has been changed to "args" to avoid the conflict.
This commit is contained in:
parent
d1e6c0334b
commit
8283410210
4
lume.lua
4
lume.lua
@ -174,9 +174,9 @@ end
|
|||||||
|
|
||||||
|
|
||||||
function lume.fn(fn, ...)
|
function lume.fn(fn, ...)
|
||||||
local arg = {...}
|
local args = {...}
|
||||||
return function(...)
|
return function(...)
|
||||||
local a = lume.merge(lume.clone(arg), {...})
|
local a = lume.merge(lume.clone(args), {...})
|
||||||
return fn(unpack(a))
|
return fn(unpack(a))
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user