We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a983201 commit 11a6246Copy full SHA for 11a6246
1 file changed
src/lib/utils/api.ts
@@ -143,6 +143,16 @@ export class ContentWrapper {
143
await this.client.getContentType(link.sys.contentType.sys.id)
144
);
145
146
+ case "Array":
147
+ const transformedArray = await Promise.all(
148
+ res[id].map((link: any) =>
149
+ this.transformLink(link, field.items!.linkType)
150
+ )
151
+ );
152
+ // Filter out any undefined items that were unpublished
153
+ res[id] = transformedArray.filter((item) => item !== undefined);
154
+ break;
155
+
156
case undefined:
157
return link;
158
}
0 commit comments