Skip to content

Commit 3d7d26e

Browse files
authored
Fix inaccurate tag counts on search when no query is entered (playfulprogramming#1254)
Fixes playfulprogramming#1253 `getAllPosts()` was returning nested/extra posts in collections, including an additional copy of every FFG post. In comparison, the searchIndex endpoint uses `getPostsByLang("en")`, which does not.
2 parents 33b4277 + 8b80864 commit 3d7d26e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: src/pages/searchFilters.json.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export const GET = async () => {
77
.getPeopleByLang("en")
88
.filter((person) => person.totalPostCount > 0);
99

10-
const posts = api.getAllPosts();
10+
const posts = api.getPostsByLang("en");
1111

1212
const tags = Object.entries(tagsObj).map(([tag, value]) => {
1313
return {

0 commit comments

Comments
 (0)