From: Paul Donald Date: Wed, 18 Feb 2026 16:56:26 +0000 (+0100) Subject: luci-base: js linting fixes / ES6 treatment X-Git-Url: http://git.99rst.org/?a=commitdiff_plain;h=172f7687e9cf3dc8dc4aa6b778efffe58e11e569;p=openwrt-luci.git luci-base: js linting fixes / ES6 treatment follow-up to 50a8d5325db0b631bc86f9e3f375d1473fd4149c Fix loop variable collision in getWifiNetidBySid Signed-off-by: Paul Donald --- diff --git a/modules/luci-base/htdocs/luci-static/resources/network.js b/modules/luci-base/htdocs/luci-static/resources/network.js index 129cd74c1e..614509bea5 100644 --- a/modules/luci-base/htdocs/luci-static/resources/network.js +++ b/modules/luci-base/htdocs/luci-static/resources/network.js @@ -215,13 +215,13 @@ function getWifiNetidBySid(sid) { if (typeof(radioname) == 'string') { const sections = uci.sections('wireless', 'wifi-iface'); let n = 0; - for (let s of sections) { - if (s.device != s.device) + for (let sec of sections) { + if (sec.device != radioname) continue; n++; - if (s['.name'] != s['.name']) + if (sec['.name'] != s['.name']) continue; return [ '%s.network%d'.format(s.device, n), s.device ];