Merge pull request #5035 from wjowsa/channel-analysis-fix-undefined

luci-mod-status: check if center_chan1 is defined
This commit is contained in:
Hannu Nyman 2021-05-06 13:38:15 +03:00 committed by GitHub
commit b1a59c50ad
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -196,7 +196,7 @@ return view.extend({
scanCache[local_wifi.bssid].data = local_wifi;
if (chan_analysis.offset_tbl[local_wifi.channel] != null) {
if (chan_analysis.offset_tbl[local_wifi.channel] != null && local_wifi.center_chan1) {
var center_channels = [local_wifi.center_chan1],
chan_width_text = local_wifi.htmode.replace(/(V)*HT/,''),
chan_width = parseInt(chan_width_text)/10;