FIX: Couldn't select values of 0 in the combo-box

This commit is contained in:
Robin Ward
2015-08-05 16:19:21 -04:00
parent 5ebd12c070
commit 7ef83913b6
2 changed files with 15 additions and 1 deletions

View File

@@ -32,7 +32,8 @@ export default Ember.Component.extend({
if (this.get('content')) {
const self = this;
this.get('content').forEach(function(o) {
let val = o[self.get('valueAttribute')] || o;
let val = o[self.get('valueAttribute')];
if (typeof val === "undefined") { val = o; }
if (!Em.isNone(val)) { val = val.toString(); }
const selectedText = (val === selected) ? "selected" : "";