Skip to content

Commit bc4a0ad

Browse files
committed
Remove .mdx (not compatible) from import.meta.glob
1 parent f603727 commit bc4a0ad

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/utils/fetchPosts.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { getNormalizedPost } from "~/utils/getNormalizedPost";
22

33
const load = async function () {
4-
const posts = import.meta.glob("~/data/posts/**/*.{md,mdx}", {
4+
const posts = import.meta.glob("~/data/posts/**/*.md", {
55
eager: true,
66
});
77

@@ -29,9 +29,9 @@ export const findPostsByIds = async (ids) => {
2929

3030
const posts = await fetchPosts();
3131

32-
return ids.reduce(function (r, a) {
33-
posts.some(function (el) {
34-
return a === el.slug && r.push(el);
32+
return ids.reduce(function (r, id) {
33+
posts.some(function (post) {
34+
return id === post.ID && r.push(post);
3535
});
3636
return r;
3737
}, []);

0 commit comments

Comments
 (0)