awful.tag: fix new when layout is nil

Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
Julien Danjou 2009-10-26 11:11:17 +01:00
parent a4f8935509
commit 7f7ffca497

View file

@ -45,7 +45,7 @@ function new(names, screen, layout)
if id == 1 then
tags[#tags].selected = true
end
setproperty(tags[#tags], "layout", layout[#tags] or layout[1] or layout)
setproperty(tags[#tags], "layout", layout and (layout[#tags] or layout[1]) or layout)
end
return tags
end