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

Commit 054c066

Browse files
author
Robert Messerle
committed
fix(tabs): adds proper detection for bodyless tabs
Closes #4120
1 parent 9ae9501 commit 054c066

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

src/components/tabs/js/tabDirective.js

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -67,12 +67,11 @@ function MdTab () {
6767
label = angular.element('<md-tab-label></md-tab-label>');
6868
if (attr.label) label.text(attr.label);
6969
else label.append(element.contents());
70-
}
71-
72-
if (body.length == 0) {
73-
var contents = element.contents().detach();
74-
body = angular.element('<md-tab-body></md-tab-body>');
75-
body.append(contents);
70+
if (body.length == 0) {
71+
var contents = element.contents().detach();
72+
body = angular.element('<md-tab-body></md-tab-body>');
73+
body.append(contents);
74+
}
7675
}
7776

7877
element.append(label);

0 commit comments

Comments
 (0)