Skip to content

Commit 962ebf4

Browse files
committed
fix lint
1 parent d19a614 commit 962ebf4

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

src/lib/tabs/tab-group.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ md-ink-bar {
3333
position: relative;
3434
overflow: hidden;
3535
display: flex;
36-
transition: height 0.5s $ease-in-out-curve-function;
36+
transition: height 500ms $ease-in-out-curve-function;
3737
}
3838

3939
// Wraps each tab body

src/lib/tabs/tabs.ts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -279,12 +279,11 @@ export class MdTabGroup {
279279
this._renderer.setElementStyle(this._tabBodyWrapper.nativeElement, 'height',
280280
this._tabBodyWrapperHeight + 'px');
281281

282-
// This statement is enough to tell the browser to force paint the height so that
282+
// This conditional forces the browser to paint the height so that
283283
// the animation to the new height can have an origin.
284-
this._tabBodyWrapper.nativeElement.offsetHeight;
285-
286-
this._renderer.setElementStyle(this._tabBodyWrapper.nativeElement, 'height',
287-
e + 'px');
284+
if (this._tabBodyWrapper.nativeElement.offsetHeight) {
285+
this._renderer.setElementStyle(this._tabBodyWrapper.nativeElement, 'height', e + 'px');
286+
}
288287
}
289288

290289
/** Removes the height of the tab body wrapper. */

0 commit comments

Comments
 (0)