luci-mod-admin-full: fix crash on wireless when no networks are declared

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
pull/1808/head
Jo-Philipp Wich 2018-05-19 23:28:14 +02:00
parent fdbb417abe
commit 37a4a1c070
1 changed files with 5 additions and 3 deletions

View File

@ -330,9 +330,11 @@ function wifi_status(devs)
local s = require "luci.tools.status"
local rv = { }
local dev
for dev in devs:gmatch("[%w%.%-]+") do
rv[#rv+1] = s.wifi_network(dev)
if type(devs) == "string" then
local dev
for dev in devs:gmatch("[%w%.%-]+") do
rv[#rv+1] = s.wifi_network(dev)
end
end
if #rv > 0 then