Skip to content

Commit

Permalink
options is always an array. fix newValues variable name.
Browse files Browse the repository at this point in the history
  • Loading branch information
miguelcobain committed Mar 19, 2015
1 parent a92bceb commit 966870e
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions addon/components/x-select.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,14 +114,12 @@ export default Ember.Component.extend({
return option.$().is(':selected');
});

options = options || Ember.A();

var newValues = options.mapBy('value');

if (isArray(this.get('value'))) {
this.get('value').setObjects(newValues);
} else {
this.set('value', newvalues);
this.set('value', newValues);
}
},

Expand Down

0 comments on commit 966870e

Please sign in to comment.