From 72f03580e8be39593ed6a37c8630e572807f0864 Mon Sep 17 00:00:00 2001 From: Matthew Wild Date: Sun, 22 Jan 2012 23:59:19 +0000 Subject: util.set: Accept nil to add_list() --- util/set.lua | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/util/set.lua b/util/set.lua index e4cc2dff..050446ec 100644 --- a/util/set.lua +++ b/util/set.lua @@ -82,8 +82,10 @@ function new(list) end function set:add_list(list) - for _, item in ipairs(list) do - items[item] = true; + if list then + for _, item in ipairs(list) do + items[item] = true; + end end end -- cgit v1.2.3