Skip to content

Commit

Permalink
fix(overige-objecten-api): fix processData function
Browse files Browse the repository at this point in the history
  • Loading branch information
AliKdhim87 committed Dec 17, 2024
1 parent ed4d2a4 commit 39f1929
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions apps/overige-objecten-api/src/utils/processData.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ interface ProcessDataParams {
}

export const processData = ({ data, priceData }: ProcessDataParams) =>
data.map((item: any) => {
data?.map((item: any) => {
if (item.component === 'ComponentComponentsUtrechtRichText') {
return mapContentByCategory(
item.categorie,
Expand All @@ -36,7 +36,7 @@ export const processData = ({ data, priceData }: ProcessDataParams) =>
return mappedContent;
}
if (item.component === 'ComponentComponentsUtrechtImage') {
const imageUrl = item.imageData.data.attributes.url;
const imageUrl = item?.imageData?.data?.attributes.url;

if (!imageUrl) return {};
if (!item.categorie) return {};
Expand Down

0 comments on commit 39f1929

Please sign in to comment.