Skip to content

Commit

Permalink
Corrected postsByTagList() logic
Browse files Browse the repository at this point in the history
  • Loading branch information
LebCit committed Sep 13, 2023
1 parent e7a3af7 commit f2f22d0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion functions/blog-doc.js
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ class Blog_Doc {
// Filter the posts to retrieve an array of post(s) including the requested tag
// Check if the post have tags, otherwise define them as an empty array
const postsByTagArray = posts.filter((post) =>
post[1].frontmatter.tags ? post[1].frontmatter.tags.includes(tag) : post[1].frontmatter.tags === []
post[1].frontmatter.tags.includes(tag) ? post[1].frontmatter.tags : post[1].frontmatter.tags == []
)

return postsByTagArray
Expand Down

0 comments on commit f2f22d0

Please sign in to comment.