When the SSID name was the same in different radio, they appear repeated in the options. This commit filter them.
Signed-off-by: Miguel Angel Mulero Martinez <migmul@gmail.com>
o = s.taboption('settings', form.DynamicList, 'ssid_list', _('SSID list'), _('List of SSIDs to enable steering on'));
WifiNetworks.forEach(function (wifiNetwork) {
- if (wifiNetwork.getSSID()) {
+ if (wifiNetwork.getSSID() && (!o.keylist || o.keylist.indexOf(wifiNetwork.getSSID()) === -1)) {
o.value(wifiNetwork.getSSID())
}
});