check_site: allow subcheck to be nil in need_table()
This commit is contained in:
parent
03ed475a42
commit
56e7753035
@ -84,9 +84,11 @@ function need_table(varname, subcheck, required)
|
|||||||
|
|
||||||
assert_type(var, 'table', "site.conf error: expected `" .. varname .. "' to be a table")
|
assert_type(var, 'table', "site.conf error: expected `" .. varname .. "' to be a table")
|
||||||
|
|
||||||
|
if subcheck then
|
||||||
for k, v in pairs(var) do
|
for k, v in pairs(var) do
|
||||||
subcheck(k, v)
|
subcheck(k, v)
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
return var
|
return var
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user