From f73e04e55716ed59b418425c6dd601a7628b2e2c Mon Sep 17 00:00:00 2001 From: nick-delirium Date: Fri, 10 May 2024 16:38:27 +0200 Subject: [PATCH] fix ui: fix usability test description check --- frontend/app/components/UsabilityTesting/TestOverview.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/app/components/UsabilityTesting/TestOverview.tsx b/frontend/app/components/UsabilityTesting/TestOverview.tsx index 4567e157b..e8b4c3ffd 100644 --- a/frontend/app/components/UsabilityTesting/TestOverview.tsx +++ b/frontend/app/components/UsabilityTesting/TestOverview.tsx @@ -403,7 +403,7 @@ const Title = observer(({ testId, siteId }: any) => { return null; } - const truncatedDescr = + const truncatedDescr = uxtestingStore.instance?.description && uxtestingStore.instance.description.length > 250 && truncate ? uxtestingStore.instance?.description.substring(0, 250) + '...' : uxtestingStore.instance?.description; @@ -504,7 +504,7 @@ const Title = observer(({ testId, siteId }: any) => {
{truncatedDescr}
- {uxtestingStore.instance.description.length > 250 ? ( + {uxtestingStore.instance?.description && uxtestingStore.instance.description.length > 250 ? (
setTruncate(!truncate)}> {truncate ? 'Show more' : 'Show less'}