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