mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
refactor(tabs): simplifies tab existence check (#648)
This commit is contained in:
committed by
Jeremy Elbourn
parent
231467d22f
commit
3c3bf0d7e3
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user