From 02bffc43ef338c083cc2b87d56d06a44721d29d3 Mon Sep 17 00:00:00 2001 From: Simone Radtke Date: Wed, 5 Jun 2024 15:59:32 +0200 Subject: [PATCH] EW-793 Change three dots in card title --- .../learnroom/mapper/common-cartridge-export.mapper.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/apps/server/src/modules/learnroom/mapper/common-cartridge-export.mapper.ts b/apps/server/src/modules/learnroom/mapper/common-cartridge-export.mapper.ts index a5e70990d1a..bc52a85d17f 100644 --- a/apps/server/src/modules/learnroom/mapper/common-cartridge-export.mapper.ts +++ b/apps/server/src/modules/learnroom/mapper/common-cartridge-export.mapper.ts @@ -141,10 +141,10 @@ export class CommonCartridgeExportMapper { } private getTextTitle(text: string): string { - const title = text - .slice(0, 50) - .replace(/<[^>]*>?/gm, '') - .concat('...'); + let title = text.slice(0, 50).replace(/<[^>]*>?/gm, ''); + if (text.length > 50) { + title = title.concat('...'); + } return title; } }