mirror of
https://github.com/LaconicNetwork/laconic.com.git
synced 2026-01-17 04:04:10 +00:00
Signed-off-by: Traxus <shyidx@gmail.com>
This commit is contained in:
parent
f11b5ac215
commit
cd9ab2e2e6
@ -437,7 +437,7 @@ export async function getRelatedBlogPosts(blogPostJson : any, matchCount : numbe
|
||||
|
||||
if (matchCategories.length > 0) {
|
||||
reservedSlugs.push(slug)
|
||||
for (let i = 0 i < blogPostsData.length i++) {
|
||||
for (i = 0 i < blogPostsData.length i++) {
|
||||
candidateBlogPost = blogPostsData[i]
|
||||
candidateBlogPostSlug = candidateBlogPost.slug
|
||||
if (matchedCount >= matchCount) {
|
||||
@ -445,7 +445,7 @@ export async function getRelatedBlogPosts(blogPostJson : any, matchCount : numbe
|
||||
}
|
||||
if (reservedSlugs.includes(candidateBlogPostSlug) === false) {
|
||||
let candidateCategories = getBlogPostCategorySlugs(candidateBlogPost)
|
||||
for (let j = 0 j < matchCategories.length j++) {
|
||||
for (j = 0 j < matchCategories.length j++) {
|
||||
let matchCategory = matchCategories[j]
|
||||
if (candidateCategories.includes(matchCategory) === true && reservedSlugs.includes(candidateBlogPostSlug) === false) {
|
||||
relatedBlogPosts.push(candidateBlogPost)
|
||||
@ -460,7 +460,7 @@ export async function getRelatedBlogPosts(blogPostJson : any, matchCount : numbe
|
||||
|
||||
if (matchedCount < matchCount) {
|
||||
//-----if not enough matches, pull in anything thats left...
|
||||
for (let i = 0 i < blogPostsData.length i++) {
|
||||
for (i = 0 i < blogPostsData.length i++) {
|
||||
candidateBlogPost = blogPostsData[i]
|
||||
candidateBlogPostSlug = candidateBlogPost.slug
|
||||
if (matchedCount >= matchCount) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user