diff --git a/src/components/tabs/js/tabDirective.js b/src/components/tabs/js/tabDirective.js
index e760a93b6ec..e551bf4df3b 100644
--- a/src/components/tabs/js/tabDirective.js
+++ b/src/components/tabs/js/tabDirective.js
@@ -67,12 +67,11 @@ function MdTab () {
label = angular.element('');
if (attr.label) label.text(attr.label);
else label.append(element.contents());
- }
-
- if (body.length == 0) {
- var contents = element.contents().detach();
- body = angular.element('');
- body.append(contents);
+ if (body.length == 0) {
+ var contents = element.contents().detach();
+ body = angular.element('');
+ body.append(contents);
+ }
}
element.append(label);