refactor(tabs): simplifies tab existence check (#648)

This commit is contained in:
Robert Messerle
2016-06-07 11:18:42 -07:00
committed by Jeremy Elbourn
parent 231467d22f
commit 3c3bf0d7e3
+1 -1
View File
@@ -64,7 +64,7 @@ export class MdTabGroup {
* ViewChildren references are ready.
*/
private get _currentLabelWrapper(): HTMLElement {
return this._labelWrappers && this._labelWrappers.toArray()[this.selectedIndex]
return this._labelWrappers && this._labelWrappers.length
? this._labelWrappers.toArray()[this.selectedIndex].elementRef.nativeElement
: null;
}