@@ -30,7 +30,7 @@ import {AbstractControl, FormGroupDirective, NgForm} from '@angular/forms';
3030import { ErrorStateMatcher , ThemePalette } from '@angular/material/core' ;
3131import { CdkPortalOutlet , TemplatePortal } from '@angular/cdk/portal' ;
3232import { Subject , Subscription } from 'rxjs' ;
33- import { takeUntil , distinctUntilChanged , map , startWith , switchMap } from 'rxjs/operators' ;
33+ import { takeUntil , map , startWith , switchMap } from 'rxjs/operators' ;
3434
3535import { MatStepHeader } from './step-header' ;
3636import { MatStepLabel } from './step-label' ;
@@ -226,19 +226,11 @@ export class MatStepper extends CdkStepper implements AfterContentInit {
226226 this . _stateChanged ( ) ;
227227 } ) ;
228228
229- this . _animationDone
230- . pipe (
231- // This needs a `distinctUntilChanged` in order to avoid emitting the same event twice due
232- // to a bug in animations where the `.done` callback gets invoked twice on some browsers.
233- // See https://github.com/angular/angular/issues/24084
234- distinctUntilChanged ( ( x , y ) => x . fromState === y . fromState && x . toState === y . toState ) ,
235- takeUntil ( this . _destroyed ) ,
236- )
237- . subscribe ( event => {
238- if ( ( event . toState as StepContentPositionState ) === 'current' ) {
239- this . animationDone . emit ( ) ;
240- }
241- } ) ;
229+ this . _animationDone . pipe ( takeUntil ( this . _destroyed ) ) . subscribe ( event => {
230+ if ( ( event . toState as StepContentPositionState ) === 'current' ) {
231+ this . animationDone . emit ( ) ;
232+ }
233+ } ) ;
242234 }
243235
244236 _stepIsNavigable ( index : number , step : MatStep ) : boolean {
0 commit comments