luci-mod-network: gracefully handle empty channel lists
Avoid undefined value access when the channel list is empty. Fixes: #5937, #5951 Signed-off-by: Jo-Philipp Wich <jo@mein.io>
This commit is contained in:
parent
4d6a238098
commit
9af8486517
1 changed files with 1 additions and 1 deletions
|
@ -480,7 +480,7 @@ var CBIWifiFrequencyValue = form.Value.extend({
|
||||||
this.toggleWifiBand(elem);
|
this.toggleWifiBand(elem);
|
||||||
|
|
||||||
bwdt.value = htval;
|
bwdt.value = htval;
|
||||||
chan.value = chval || chan.options[0].value;
|
chan.value = chval || (chan.options[0] ? chan.options[0].value : 'auto');
|
||||||
|
|
||||||
return elem;
|
return elem;
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in a new issue