mirror of https://github.com/openwrt/luci.git
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
parent
fdbb417abe
commit
37a4a1c070
|
@ -330,10 +330,12 @@ function wifi_status(devs)
|
||||||
local s = require "luci.tools.status"
|
local s = require "luci.tools.status"
|
||||||
local rv = { }
|
local rv = { }
|
||||||
|
|
||||||
|
if type(devs) == "string" then
|
||||||
local dev
|
local dev
|
||||||
for dev in devs:gmatch("[%w%.%-]+") do
|
for dev in devs:gmatch("[%w%.%-]+") do
|
||||||
rv[#rv+1] = s.wifi_network(dev)
|
rv[#rv+1] = s.wifi_network(dev)
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
if #rv > 0 then
|
if #rv > 0 then
|
||||||
luci.http.prepare_content("application/json")
|
luci.http.prepare_content("application/json")
|
||||||
|
|
Loading…
Reference in New Issue