From 2549b854d3a33b974d37d428d5eb8951cc98e766 Mon Sep 17 00:00:00 2001 From: Omri Levy <61207713+Omri-Levy@users.noreply.github.com> Date: Mon, 1 Jul 2024 15:09:23 +0300 Subject: [PATCH] fix(backoffice-v2): fixed filter condition (#2494) --- .../adapters/report-adapter/report-adapter.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/backoffice-v2/src/domains/business-reports/adapters/report-adapter/report-adapter.ts b/apps/backoffice-v2/src/domains/business-reports/adapters/report-adapter/report-adapter.ts index d559cbdbdd..7c1d4ae3c6 100644 --- a/apps/backoffice-v2/src/domains/business-reports/adapters/report-adapter/report-adapter.ts +++ b/apps/backoffice-v2/src/domains/business-reports/adapters/report-adapter/report-adapter.ts @@ -93,7 +93,7 @@ export const reportAdapter = { src: data?.imageUrl, link: data?.adsInformation?.link, })) - .filter(Boolean), + .filter(({ src }) => !!src), relatedAdsImages: Object.values(data?.report?.data?.socialMedia?.ads ?? {}) .map(data => ({ src: data?.pickedAd?.imageUrl, @@ -194,7 +194,7 @@ export const reportAdapter = { src: data?.imageUrl, link: data?.adsInformation?.link, })) - .filter(Boolean), + .filter(({ src }) => !!src), relatedAdsImages: Object.values(data?.report?.data?.socialMedia?.ads ?? {}) .map(data => ({ src: data?.pickedAd?.imageUrl,