this repo has no description
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

๐Ÿ’š Handle works with undefined aliases

authored by

Gwenn Le Bihan and committed by
GitHub
584ccfca c11f04df

+1 -1
+1 -1
src/pages/works/[work].astro
··· 11 11 12 12 export const getStaticPaths = (async () => { 13 13 return await getCollection("works").then((works) => 14 - works.flatMap(work => [work.id, ...work.data.aliases]).map((id) => ({ params: { work: id } })), 14 + works.flatMap(({ id, data: { aliases = [] }}) => [id, ...aliases]).map((id) => ({ params: { work: id } })), 15 15 ); 16 16 }) satisfies GetStaticPaths; 17 17