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

Commit

Permalink
fix(tabs): adds proper detection for bodyless tabs
Browse files Browse the repository at this point in the history
Closes #4120
  • Loading branch information
Robert Messerle committed Oct 6, 2015
1 parent 9ae9501 commit 054c066
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions src/components/tabs/js/tabDirective.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,12 +67,11 @@ function MdTab () {
label = angular.element('<md-tab-label></md-tab-label>');
if (attr.label) label.text(attr.label);
else label.append(element.contents());
}

if (body.length == 0) {
var contents = element.contents().detach();
body = angular.element('<md-tab-body></md-tab-body>');
body.append(contents);
if (body.length == 0) {
var contents = element.contents().detach();
body = angular.element('<md-tab-body></md-tab-body>');
body.append(contents);
}
}

element.append(label);
Expand Down

0 comments on commit 054c066

Please sign in to comment.