luci-mod-network: wireless.js: fix null access on unavailable country list

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
This commit is contained in:
Jo-Philipp Wich 2019-10-15 10:03:48 +02:00
parent 120ece921d
commit f61d6ee148

View file

@ -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]);
}
});