mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-28 01:56:01 -05:00
FIX: combo-box shouldn't crash if no options available
This is a fix for bdfe91914f
This commit is contained in:
parent
ef81b8787e
commit
6b1cfd8d87
1 changed files with 1 additions and 1 deletions
|
@ -69,7 +69,7 @@ export default Ember.Component.extend({
|
|||
const castInteger = this.get('castInteger');
|
||||
$elem.on("change", function (e) {
|
||||
let val = $(e.target).val();
|
||||
if (val.length && castInteger) {
|
||||
if (val && val.length && castInteger) {
|
||||
val = parseInt(val, 10);
|
||||
}
|
||||
self.set('value', val);
|
||||
|
|
Loading…
Reference in a new issue