Skip to content

Commit 172f768

Browse files
committed
luci-base: js linting fixes / ES6 treatment
follow-up to 50a8d53 Fix loop variable collision in getWifiNetidBySid Signed-off-by: Paul Donald <newtwen+github@gmail.com>
1 parent ad057c1 commit 172f768

File tree

1 file changed

+3
-3
lines changed
  • modules/luci-base/htdocs/luci-static/resources

1 file changed

+3
-3
lines changed

modules/luci-base/htdocs/luci-static/resources/network.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -215,13 +215,13 @@ function getWifiNetidBySid(sid) {
215215
if (typeof(radioname) == 'string') {
216216
const sections = uci.sections('wireless', 'wifi-iface');
217217
let n = 0;
218-
for (let s of sections) {
219-
if (s.device != s.device)
218+
for (let sec of sections) {
219+
if (sec.device != radioname)
220220
continue;
221221

222222
n++;
223223

224-
if (s['.name'] != s['.name'])
224+
if (sec['.name'] != s['.name'])
225225
continue;
226226

227227
return [ '%s.network%d'.format(s.device, n), s.device ];

0 commit comments

Comments
 (0)