Skip to content

Commit 5347f42

Browse files
fixing static collection error
1 parent ce3f304 commit 5347f42

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/pages/categorias/[category]/[...page].astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export async function getStaticPaths({ paginate }) {
1414
}
1515
1616
const allPosts = await getCollection("blog");
17-
return allCategories.map((categoryObj) => {
17+
return allCategories.flatMap((categoryObj) => {
1818
let filteredPosts =
1919
categoryObj.key == "todo" ? allPosts : allPosts.filter((post) => post.data.categories.includes(categoryObj.key));
2020
filteredPosts.sort((a, b) => b.data.pubDate.valueOf() - a.data.pubDate.valueOf());

0 commit comments

Comments
 (0)