From: Jo-Philipp Wich Date: Tue, 15 Oct 2019 08:03:48 +0000 (+0200) Subject: luci-mod-network: wireless.js: fix null access on unavailable country list X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=f61d6ee14887a196c753753bc7eb290b12e5ce9e;p=oweals%2Fluci.git luci-mod-network: wireless.js: fix null access on unavailable country list Signed-off-by: Jo-Philipp Wich --- 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]); } });