Skip to content

Commit 8bfbcb0

Browse files
committed
issue fixed-2
1 parent a287a37 commit 8bfbcb0

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/templates/blog-post.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,13 @@ function BlogPostTemplate({ data }) {
107107
let count = 0;
108108
tags.forEach((tag) => {
109109
blogsByTags.forEach((n) => {
110-
if (n.node.frontmatter.tags.includes(tag) && count <8 && !k.includes(n.node.id) && n.node.frontmatter.authorimage && n.node.frontmatter.author) {
110+
if (
111+
n.node.frontmatter.tags.includes(tag) &&
112+
count < 8 &&
113+
!k.includes(n.node.id) &&
114+
n.node.frontmatter.authorimage &&
115+
n.node.frontmatter.author
116+
) {
111117
count += 1;
112118
k.push(n.node.id);
113119
node.push(n.node);

0 commit comments

Comments
 (0)