awful.util: table.join ignore nil arguments
Signed-off-by: koniu <gkusnierz@gmail.com> Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
parent
b9ca6b4961
commit
37071c5f6f
|
@ -224,11 +224,13 @@ end
|
|||
function table.join(...)
|
||||
local ret = {}
|
||||
for i = 1, arg.n do
|
||||
for k, v in pairs(arg[i]) do
|
||||
if type(k) == "number" then
|
||||
rtable.insert(ret, v)
|
||||
else
|
||||
ret[k] = v
|
||||
if arg[i] then
|
||||
for k, v in pairs(arg[i]) do
|
||||
if type(k) == "number" then
|
||||
rtable.insert(ret, v)
|
||||
else
|
||||
ret[k] = v
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue