luci-mod-status: check if center_chan1 is defined 5035/head
authorWojciech Jowsa <wojciech.jowsa@gmail.com>
Wed, 5 May 2021 13:28:39 +0000 (15:28 +0200)
committerWojciech Jowsa <wojciech.jowsa@gmail.com>
Wed, 5 May 2021 14:01:01 +0000 (16:01 +0200)
Signed-off-by: Wojciech Jowsa <wojciech.jowsa@gmail.com>
modules/luci-mod-status/htdocs/luci-static/resources/view/status/channel_analysis.js

index 5f838108ef4d97e796f201ee9441139e3df7d9bb..4b321a4f334bab24a5f21bcfb4e4a2d0c5671614 100644 (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;