From b9f0ea06a982135e9a2dcd3c1121e46d179ee9da Mon Sep 17 00:00:00 2001 From: Paul Donald Date: Mon, 3 Nov 2025 22:34:08 +0100 Subject: [PATCH] luci-mod-network: dynamically find mode and bssid positions Dynamically find the mode and bssid position assignments in case their position should change later. Signed-off-by: Paul Donald (cherry picked from commit fd96244e7977c4fb3dc410957f5d634f8561ce05) --- .../htdocs/luci-static/resources/view/network/wireless.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/luci-mod-network/htdocs/luci-static/resources/view/network/wireless.js b/modules/luci-mod-network/htdocs/luci-static/resources/view/network/wireless.js index 6a5a029e5a..88ebec2125 100644 --- a/modules/luci-mod-network/htdocs/luci-static/resources/view/network/wireless.js +++ b/modules/luci-mod-network/htdocs/luci-static/resources/view/network/wireless.js @@ -1128,8 +1128,8 @@ return view.extend({ let encr; if (hwtype == 'mac80211') { - const mode = ss.children[0]; - const bssid = ss.children[5]; + const mode = ss.children.find(obj => obj.option === 'mode'); + const bssid = ss.children.find(obj => obj.option === 'bssid'); if (have_mesh) mode.value('mesh', '802.11s'); mode.value('ahdemo', _('Pseudo Ad-Hoc (ahdemo)')); -- 2.30.2