Fixes nil ifid (#6793)

This commit is contained in:
MatteoBiscosi 2022-07-27 10:55:56 +02:00
parent ccc7743118
commit 4414e1971d

View file

@ -18,8 +18,10 @@ sendHTTPContentTypeHeader('application/json')
local ifid = _GET["ifid"]
if not isEmptyString(ifid) then
interface.select(ifid)
if (ifid) and (not isEmptyString(ifid)) then
interface.select(ifid)
else
ifid = interface.getId()
end
local ifstats = interface.getStats()