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 7ed75db commit 3cdc748Copy full SHA for 3cdc748
src/modules/post/common.ts
@@ -20,9 +20,11 @@ export const getPostsWithReadingTimeFromPosts = async (
20
21
// other frontmatter props are in post.data...
22
// readingTimes is in post.readingTimes
23
- const postsWithReadingTimeAndSlug = posts
24
- .map((post, index) => ({ ...post, ...readingTimes[index] }))
25
- .map(idToSlug);
+ const postsWithReadingTimeAndSlug = posts.map((post, index) => ({
+ ...idToSlug(post),
+ ...readingTimes[index],
26
+ }));
27
+
28
return postsWithReadingTimeAndSlug;
29
};
30
0 commit comments