feat: remove support for nested categories

This commit is contained in:
saicaca
2023-12-14 13:43:06 +08:00
parent f7efa010a2
commit f9a78b3e3b
9 changed files with 50 additions and 99 deletions

View File

@@ -20,7 +20,7 @@ if (Array.isArray(tags) && tags.length > 0) {
if (Array.isArray(categories) && categories.length > 0) {
posts = posts.filter(post =>
Array.isArray(post.data.categories) && post.data.categories.some(category => categories.includes(category))
post.data.category && categories.includes(post.data.category)
);
}