Skip to content

Commit

Permalink
Add default 0 value to number in translate cases pipe (#2275)
Browse files Browse the repository at this point in the history
  • Loading branch information
doliinyk authored Oct 10, 2023
1 parent 63c667c commit 3fac991
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/app/shared/pipes/translate-cases.pipe.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export class TranslateCasesPipe implements PipeTransform {

transform(count: number, enumTranslate: any): string {
const countLastStr = count?.toString().slice(-1);
let countNum = count?.toString();
let countNum = count?.toString() || '0';

if (count === 0 || (count >= 11 && count <= 14)) {
this.translateKey = enumTranslate[2];
Expand Down

0 comments on commit 3fac991

Please sign in to comment.