summaryrefslogtreecommitdiffhomepage
path: root/modules
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2018-05-19 23:28:14 +0200
committerJo-Philipp Wich <jo@mein.io>2018-05-19 23:28:14 +0200
commit37a4a1c0702c64b15a2833ce8935bccc4899443e (patch)
tree8af3c319408664147abb4f536288330f85838fe6 /modules
parentfdbb417abe9f5cfb950bcaaf03a55ff400226cef (diff)
luci-mod-admin-full: fix crash on wireless when no networks are declared
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'modules')
-rw-r--r--modules/luci-mod-admin-full/luasrc/controller/admin/network.lua8
1 files changed, 5 insertions, 3 deletions
diff --git a/modules/luci-mod-admin-full/luasrc/controller/admin/network.lua b/modules/luci-mod-admin-full/luasrc/controller/admin/network.lua
index ab6db4fef..a26d3d14e 100644
--- a/modules/luci-mod-admin-full/luasrc/controller/admin/network.lua
+++ b/modules/luci-mod-admin-full/luasrc/controller/admin/network.lua
@@ -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