Skip to content

Commit f9bca9a

Browse files
committed
fix:added object and array condition for reference in contentful
1 parent 0a633c9 commit f9bca9a

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

api/src/services/contentful.service.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -272,8 +272,12 @@ const processField = (
272272
return refs;
273273
}
274274
const id = lang_value?.sys?.id;
275-
if (entryId && id in entryId) return [[entryId?.[id]]];
276-
return null;
275+
if(Array?.isArray(entryId?.id)){
276+
return entryId?.[id];
277+
}
278+
else{
279+
return [entryId?.[id]];
280+
}
277281
}
278282

279283
case 'app': {

0 commit comments

Comments
 (0)