Fix many missing requires.

This commit is contained in:
Nicolo Maio 2024-02-20 10:14:40 +01:00
parent e243f7c826
commit 83634d06e1
6 changed files with 9 additions and 4 deletions

View file

@ -162,11 +162,11 @@ function hostkey2hostinfo(key)
local host = {}
local info = split(key,"@")
if(info[1] ~= nil) then
if(info and info[1] ~= nil) then
host["host"] = info[1]
end
if(info[2] ~= nil) then
if(info and info[2] ~= nil) then
host["vlan"] = tonumber(info[2])
else
host["vlan"] = 0