Skip to content
This repository has been archived by the owner on Sep 5, 2024. It is now read-only.

Commit

Permalink
fix(select): fix resetting value for selects without placeholder
Browse files Browse the repository at this point in the history
closes #1737
  • Loading branch information
rschmukler committed Mar 2, 2015
1 parent 31c8992 commit 2a0ea16
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/select/select.js
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ function SelectDirective($mdSelect, $mdUtil, $mdTheming, $interpolate, $compile,
mdSelectCtrl.setLabelText = function(text) {
if (customLabel) return; // Assume that user is handling it on their own
mdSelectCtrl.setIsPlaceholder(!text);
var newText = text || attr.placeholder;
var newText = text || attr.placeholder || '';
var target = customLabel ? labelEl : labelEl.children().eq(0);
target.text(newText);
};
Expand Down

0 comments on commit 2a0ea16

Please sign in to comment.