luci-base: js linting fixes / ES6 treatment
authorPaul Donald <redacted>
Wed, 18 Feb 2026 16:56:26 +0000 (17:56 +0100)
committerPaul Donald <redacted>
Wed, 18 Feb 2026 16:56:26 +0000 (17:56 +0100)
follow-up to 50a8d5325db0b631bc86f9e3f375d1473fd4149c

Fix loop variable collision in getWifiNetidBySid

Signed-off-by: Paul Donald <redacted>
modules/luci-base/htdocs/luci-static/resources/network.js

index 129cd74c1ea1351f9c84b2b7ea5afeb7d77ca52e..614509bea567684f41bdc58927192fc0e8486f63 100644 (file)
@@ -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 ];
git clone https://git.99rst.org/PROJECT