only link to posts with the same main category
All checks were successful
Web/pipeline/head This commit looks good

This commit is contained in:
Ell 2021-03-31 02:55:17 +02:00
parent 0271b1563c
commit 513f54bb2e

View file

@ -76,7 +76,8 @@ function getAdjacentPost(json, index, move) {
let post = json[index]; let post = json[index];
if (!post) if (!post)
break; break;
if (post.cat.includes(cat) && !post.archived) // only link to posts with the same main category
if (post.cat[0] === cat && !post.archived)
return post; return post;
} }
} }