Skip to content

Commit

Permalink
refactor(tabs): simplifies tab existence check (#648)
Browse files Browse the repository at this point in the history
  • Loading branch information
robertmesserle authored and jelbourn committed Jun 7, 2016
1 parent 231467d commit 3c3bf0d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/tabs/tabs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 3c3bf0d

Please sign in to comment.