From f61d6ee14887a196c753753bc7eb290b12e5ce9e Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Tue, 15 Oct 2019 10:03:48 +0200 Subject: [PATCH] luci-mod-network: wireless.js: fix null access on unavailable country list Signed-off-by: Jo-Philipp Wich --- .../htdocs/luci-static/resources/view/network/wireless.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/luci-mod-network/htdocs/luci-static/resources/view/network/wireless.js b/modules/luci-mod-network/htdocs/luci-static/resources/view/network/wireless.js index c9f5957f8..e200e438a 100644 --- a/modules/luci-mod-network/htdocs/luci-static/resources/view/network/wireless.js +++ b/modules/luci-mod-network/htdocs/luci-static/resources/view/network/wireless.js @@ -483,7 +483,7 @@ var CBIWifiCountryValue = form.Value.extend({ }, renderWidget: function(section_id, option_index, cfgvalue) { - var typeClass = this.keylist.length ? form.ListValue : form.Value; + var typeClass = (this.keylist && this.keylist.length) ? form.ListValue : form.Value; return typeClass.prototype.renderWidget.apply(this, [section_id, option_index, cfgvalue]); } }); -- 2.25.1