Skip to content

Commit 8dacc5d

Browse files
authored
fix(button): add check for animationScheduler sub on destroy (#16734)
1 parent 37dccb4 commit 8dacc5d

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

projects/igniteui-angular/src/lib/directives/button/button-base.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,9 @@ export abstract class IgxButtonBaseDirective implements AfterViewInit, OnDestroy
120120
}
121121

122122
public ngOnDestroy(): void {
123-
this._animationScheduler.unsubscribe();
123+
if (this._animationScheduler) {
124+
this._animationScheduler.unsubscribe();
125+
}
124126
}
125127

126128
/**

0 commit comments

Comments
 (0)