diff options
author | Sergey Ponomarev <stokito@gmail.com> | 2023-09-23 10:34:35 +0300 |
---|---|---|
committer | Sergey Ponomarev <stokito@gmail.com> | 2023-09-23 10:34:35 +0300 |
commit | d35dd2d48994266278a9d066cbb99f849c46eb5d (patch) | |
tree | c1fbc1071af20ff008147a1c4077e998e7da0045 /modules/luci-base/htdocs/luci-static | |
parent | f423025927c73947db0a280219d61cd872cebee6 (diff) |
luci-base: network.js: simplify getWifiNetidBySid
Remove unused variables i and netid and reuse radioname
Signed-off-by: Sergey Ponomarev <stokito@gmail.com>
Diffstat (limited to 'modules/luci-base/htdocs/luci-static')
-rw-r--r-- | modules/luci-base/htdocs/luci-static/resources/network.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/luci-base/htdocs/luci-static/resources/network.js b/modules/luci-base/htdocs/luci-static/resources/network.js index 2568017c26..84a855b0ac 100644 --- a/modules/luci-base/htdocs/luci-static/resources/network.js +++ b/modules/luci-base/htdocs/luci-static/resources/network.js @@ -210,8 +210,8 @@ function getWifiNetidBySid(sid) { var s = uci.get('wireless', sid); if (s != null && s['.type'] == 'wifi-iface') { var radioname = s.device; - if (typeof(s.device) == 'string') { - var i = 0, netid = null, sections = uci.sections('wireless', 'wifi-iface'); + if (typeof(radioname) == 'string') { + var sections = uci.sections('wireless', 'wifi-iface'); for (var i = 0, n = 0; i < sections.length; i++) { if (sections[i].device != s.device) continue; |