Merge pull request #3581 from riking/patch-3
FIX: combo-box shouldn't crash if no options available
This commit is contained in:
commit
1e2e450772
|
@ -69,7 +69,7 @@ export default Ember.Component.extend({
|
||||||
const castInteger = this.get('castInteger');
|
const castInteger = this.get('castInteger');
|
||||||
$elem.on("change", function (e) {
|
$elem.on("change", function (e) {
|
||||||
let val = $(e.target).val();
|
let val = $(e.target).val();
|
||||||
if (val.length && castInteger) {
|
if (val && val.length && castInteger) {
|
||||||
val = parseInt(val, 10);
|
val = parseInt(val, 10);
|
||||||
}
|
}
|
||||||
self.set('value', val);
|
self.set('value', val);
|
||||||
|
|
Loading…
Reference in New Issue