luci-mod-status: check if center_chan1 is defined
authorWojciech Jowsa <[email protected]>
Wed, 5 May 2021 13:28:39 +0000 (15:28 +0200)
committerJo-Philipp Wich <[email protected]>
Sat, 12 Jun 2021 18:01:58 +0000 (20:01 +0200)
Signed-off-by: Wojciech Jowsa <[email protected]>
(cherry picked from commit ead64c0195cd792341a6dddce7ea5e724247c60d)

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;