Skip to content

Commit

Permalink
fix(module:button): only warn about deprecated value when used (#6193)
Browse files Browse the repository at this point in the history
fixes #6191, fixes #6187
  • Loading branch information
Airblader authored Dec 15, 2020
1 parent 8d24ea6 commit 40c644a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion components/button/button.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ export class NzButtonComponent implements OnDestroy, OnChanges, AfterViewInit, A
this.loading$.next(this.nzLoading);
}

if (nzType) {
if (nzType?.currentValue === 'danger') {
warnDeprecation(`'danger' value of 'nzType' in Button is going to be removed in 12.0.0. Please use 'nzDanger' instead.`);
}
}
Expand Down

0 comments on commit 40c644a

Please sign in to comment.