From 37071c5f6fd6552967471ed761c2044a1dc0a610 Mon Sep 17 00:00:00 2001 From: koniu Date: Sat, 18 Apr 2009 22:22:15 +0100 Subject: [PATCH] awful.util: table.join ignore nil arguments Signed-off-by: koniu Signed-off-by: Julien Danjou --- lib/awful/util.lua.in | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/lib/awful/util.lua.in b/lib/awful/util.lua.in index 2f99b333e..d310204fe 100644 --- a/lib/awful/util.lua.in +++ b/lib/awful/util.lua.in @@ -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