From 94ac2ce3a1ef905eb190cf973ea90db871acfb75 Mon Sep 17 00:00:00 2001 From: anemne <63043552+anemne@users.noreply.github.com> Date: Tue, 26 Nov 2024 13:46:02 +0100 Subject: [PATCH] dd checks in seo (#910) --- src/utils/seo.ts | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/src/utils/seo.ts b/src/utils/seo.ts index 780e3e2b5..9435cd48d 100644 --- a/src/utils/seo.ts +++ b/src/utils/seo.ts @@ -103,13 +103,16 @@ export function seoDataFromCustomerCase(customerCase: CustomerCaseDocument) { keywords: [ customerCase.projectInfo.customer, customerCase.projectInfo.sector, - customerCase.projectInfo.deliveries.projectManagement.map( - (d) => d.projectManagementDelivery, - ), - customerCase.projectInfo.deliveries.design.map((d) => d.designDelivery), - customerCase.projectInfo.deliveries.development.map( - (d) => d.developmentDelivery, - ), + customerCase.projectInfo.deliveries.projectManagement && + customerCase.projectInfo.deliveries.projectManagement.map( + (d) => d.projectManagementDelivery, + ), + customerCase.projectInfo.deliveries.design && + customerCase.projectInfo.deliveries.design.map((d) => d.designDelivery), + customerCase.projectInfo.deliveries.development && + customerCase.projectInfo.deliveries.development.map( + (d) => d.developmentDelivery, + ), ].join(","), }; }