We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3d4fd9f commit 7d27e4dCopy full SHA for 7d27e4d
src/util/changelog.ts
@@ -23,10 +23,6 @@ export async function getChangelogs({
23
}: GetChangelogsOptions): Promise<Array<CollectionEntry<"changelog">>> {
24
let entries = await getCollection("changelog");
25
26
- if (filter) {
27
- entries = entries.filter((e) => filter(e));
28
- }
29
-
30
entries = await Promise.all(
31
entries.map(async (e) => {
32
const slug = e.id.split("/").slice(1).join("/");
@@ -52,6 +48,10 @@ export async function getChangelogs({
52
48
}),
53
49
);
54
50
51
+ if (filter) {
+ entries = entries.filter((e) => filter(e));
+ }
+
55
return entries.sort((a, b) => b.data.date.getTime() - a.data.date.getTime());
56
}
57
0 commit comments