Skip to content

Commit

Permalink
fix(md-chips placeholder): correct placeholder/secondary logic
Browse files Browse the repository at this point in the history
The logic test deciding when to show the secondary placeholder was backwards, causing the secondary placeholder to be shown when no chips were present.

Fixes github issues angular#2770 and angular#4476.
  • Loading branch information
ericgundrum committed Jan 4, 2016
1 parent 7f38bc1 commit 6064a1d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/chips/js/chipsController.js
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ MdChipsCtrl.prototype.getPlaceholder = function() {
// Allow `secondary-placeholder` to be blank.
var useSecondary = (this.items.length &&
(this.secondaryPlaceholder == '' || this.secondaryPlaceholder));
return useSecondary ? this.placeholder : this.secondaryPlaceholder;
return useSecondary ? this.secondaryPlaceholder : this.placeholder;
};

/**
Expand Down

0 comments on commit 6064a1d

Please sign in to comment.