Skip to content

Commit

Permalink
Merge pull request esbanarango#28 from earayo/master
Browse files Browse the repository at this point in the history
Allow use all types
  • Loading branch information
esbanarango authored Jun 21, 2016
2 parents d589a43 + 3356e18 commit 4af7477
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
6 changes: 5 additions & 1 deletion addon/components/place-autocomplete-field.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,11 @@ export default Component.extend({
},

_typesToArray() {
return this.get('types').split(',');
if (this.get('types') !== "") {
return this.get('types').split(',');
} else {
return [];
}
},

actions: {
Expand Down
4 changes: 3 additions & 1 deletion tests/unit/components/place-autocomplete-field-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,9 @@ describeComponent(
it('converts types in an empty string', function(){
var component = this.subject();
component.set('types', '');
expect(component._typesToArray()).to.eql("");
expect(component._typesToArray()).to.eql([]);
});


}
);

0 comments on commit 4af7477

Please sign in to comment.