Add typecheck for 'add_help' property

This commit is contained in:
mpeterv
2015-06-20 18:23:29 +03:00
parent af793c49f3
commit d88c84be57

View File

@@ -153,6 +153,8 @@ local function boundaries(name)
end end
local add_help = {"add_help", function(self, value) local add_help = {"add_help", function(self, value)
typecheck("add_help", {"boolean", "string", "table"}, value)
if self._has_help then if self._has_help then
table.remove(self._options) table.remove(self._options)
self._has_help = false self._has_help = false