diff --git a/packages/media-entity/src/entities/gallery.ts b/packages/media-entity/src/entities/gallery.ts index e8f0972..212a24f 100644 --- a/packages/media-entity/src/entities/gallery.ts +++ b/packages/media-entity/src/entities/gallery.ts @@ -41,7 +41,7 @@ export function hydrateGallery( ): Gallery { return { ...data, - stacks: data.stacks.map((data) => hydrateStack(data)), + stacks: (data.stacks || []).map((data) => hydrateStack(data)), } } @@ -53,7 +53,8 @@ export function hydrateStack( ): Stack { return { ...data, - variants: data.variants.map(hydrateStackImage), + variants: (data.variants || []).map(hydrateStackImage), + tags: data.tags || [], } }