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

Commit 4be344b

Browse files
committed
fix(select): fix md-select with no placeholder outside of
md-input-container closes #3483
1 parent 9a045fb commit 4be344b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/components/select/select.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ function SelectDirective($mdSelect, $mdUtil, $mdTheming, $mdAria, $interpolate,
184184
mdSelectCtrl.setLabelText = function(text) {
185185
mdSelectCtrl.setIsPlaceholder(!text);
186186
// Use placeholder attribute, otherwise fallback to the md-input-container label
187-
var tmpPlaceholder = attr.placeholder || (containerCtrl.label ? containerCtrl.label.text() : '');
187+
var tmpPlaceholder = attr.placeholder || (containerCtrl && containerCtrl.label ? containerCtrl.label.text() : '');
188188
text = text || tmpPlaceholder || '';
189189
var target = valueEl.children().eq(0);
190190
target.text(text);
@@ -372,7 +372,7 @@ function SelectDirective($mdSelect, $mdUtil, $mdTheming, $mdAria, $interpolate,
372372
element: selectContainer,
373373
target: element[0],
374374
hasBackdrop: true,
375-
loadingAsync: attr.mdOnOpen ? scope.$eval(attr.mdOnOpen) || true : false,
375+
loadingAsync: attr.mdOnOpen ? scope.$eval(attr.mdOnOpen) || true : false
376376
}).then(function(selectedText) {
377377
isOpen = false;
378378
});

0 commit comments

Comments
 (0)