@@ -42,7 +42,7 @@ import {AbstractControl, FormGroupDirective, NgForm} from '@angular/forms';
4242import { ErrorStateMatcher , ThemePalette } from '@angular/material/core' ;
4343import { CdkPortalOutlet , TemplatePortal } from '@angular/cdk/portal' ;
4444import { Subject , Subscription } from 'rxjs' ;
45- import { takeUntil , distinctUntilChanged , map , startWith , switchMap } from 'rxjs/operators' ;
45+ import { takeUntil , map , startWith , switchMap } from 'rxjs/operators' ;
4646
4747import { MatStepHeader } from './step-header' ;
4848import { MatStepLabel } from './step-label' ;
@@ -247,19 +247,11 @@ export class MatStepper extends CdkStepper implements AfterContentInit {
247247 this . _stateChanged ( ) ;
248248 } ) ;
249249
250- this . _animationDone
251- . pipe (
252- // This needs a `distinctUntilChanged` in order to avoid emitting the same event twice due
253- // to a bug in animations where the `.done` callback gets invoked twice on some browsers.
254- // See https://github.com/angular/angular/issues/24084
255- distinctUntilChanged ( ( x , y ) => x . fromState === y . fromState && x . toState === y . toState ) ,
256- takeUntil ( this . _destroyed ) ,
257- )
258- . subscribe ( event => {
259- if ( ( event . toState as StepContentPositionState ) === 'current' ) {
260- this . animationDone . emit ( ) ;
261- }
262- } ) ;
250+ this . _animationDone . pipe ( takeUntil ( this . _destroyed ) ) . subscribe ( event => {
251+ if ( ( event . toState as StepContentPositionState ) === 'current' ) {
252+ this . animationDone . emit ( ) ;
253+ }
254+ } ) ;
263255 }
264256
265257 _stepIsNavigable ( index : number , step : MatStep ) : boolean {
0 commit comments