@@ -31,7 +31,7 @@ import {
31
31
ViewEncapsulation ,
32
32
} from '@angular/core' ;
33
33
import { Subject , Subscription } from 'rxjs' ;
34
- import { distinctUntilChanged , startWith } from 'rxjs/operators' ;
34
+ import { startWith } from 'rxjs/operators' ;
35
35
import { matTabsAnimations } from './tabs-animations' ;
36
36
37
37
/**
@@ -180,24 +180,16 @@ export class MatTabBody implements OnInit, OnDestroy {
180
180
} ) ;
181
181
}
182
182
183
- // Ensure that we get unique animation events, because the `.done` callback can get
184
- // invoked twice in some browsers. See https://github.com/angular/angular/issues/24084.
185
- this . _translateTabComplete
186
- . pipe (
187
- distinctUntilChanged ( ( x , y ) => {
188
- return x . fromState === y . fromState && x . toState === y . toState ;
189
- } ) ,
190
- )
191
- . subscribe ( event => {
192
- // If the transition to the center is complete, emit an event.
193
- if ( this . _isCenterPosition ( event . toState ) && this . _isCenterPosition ( this . _position ) ) {
194
- this . _onCentered . emit ( ) ;
195
- }
183
+ this . _translateTabComplete . subscribe ( event => {
184
+ // If the transition to the center is complete, emit an event.
185
+ if ( this . _isCenterPosition ( event . toState ) && this . _isCenterPosition ( this . _position ) ) {
186
+ this . _onCentered . emit ( ) ;
187
+ }
196
188
197
- if ( this . _isCenterPosition ( event . fromState ) && ! this . _isCenterPosition ( this . _position ) ) {
198
- this . _afterLeavingCenter . emit ( ) ;
199
- }
200
- } ) ;
189
+ if ( this . _isCenterPosition ( event . fromState ) && ! this . _isCenterPosition ( this . _position ) ) {
190
+ this . _afterLeavingCenter . emit ( ) ;
191
+ }
192
+ } ) ;
201
193
}
202
194
203
195
/**
0 commit comments