const zoneval = zoneopt ? zoneopt.formvalue('_new_') : null;
const enc = L.isObject(bss.encryption) ? bss.encryption : null;
const is_wep = (enc && Array.isArray(enc.wep));
- const is_psk = (enc && Array.isArray(enc.wpa) && L.toArray(enc.authentication).filter(function(a) { return a == 'psk'; }).length > 0);
- const is_sae = (enc && Array.isArray(enc.wpa) && L.toArray(enc.authentication).filter(function(a) { return a == 'sae'; }).length > 0);
+ const is_psk = (enc && Array.isArray(enc.wpa) && L.toArray(enc.authentication).some(a => a == 'psk'));
+ const is_sae = (enc && Array.isArray(enc.wpa) && L.toArray(enc.authentication).some(a => a == 'sae'));
if (nameval == null || (passopt && passval == null))
return;
const s2 = m2.section(form.NamedSection, '_new_');
const enc = L.isObject(bss.encryption) ? bss.encryption : null;
const is_wep = (enc && Array.isArray(enc.wep));
- const is_psk = (enc && Array.isArray(enc.wpa) && L.toArray(enc.authentication).filter(function(a) { return a == 'psk' || a == 'sae'; }));
+ const is_psk = (enc && Array.isArray(enc.wpa) && L.toArray(enc.authentication).some(a => a == 'psk' || a == 'sae'));
let replace, passphrase, name, bssid, zone;
function nameUsed(name) {