From 3fac9918226a7976c28d18d1e6a73d8ddc6b8f84 Mon Sep 17 00:00:00 2001 From: Denys Oliinyk <68949838+doliinyk@users.noreply.github.com> Date: Tue, 10 Oct 2023 11:29:34 +0300 Subject: [PATCH] Add default 0 value to number in translate cases pipe (#2275) --- src/app/shared/pipes/translate-cases.pipe.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/shared/pipes/translate-cases.pipe.ts b/src/app/shared/pipes/translate-cases.pipe.ts index 724aa22448..a6498a1353 100644 --- a/src/app/shared/pipes/translate-cases.pipe.ts +++ b/src/app/shared/pipes/translate-cases.pipe.ts @@ -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];