Signed-off-by: Traxus <shyidx@gmail.com>

This commit is contained in:
Traxus 2023-04-24 15:32:14 -04:00
parent b8aeb938aa
commit cece4ae745

View File

@ -193,7 +193,7 @@ function jsonNodesExist(jsonData : any, nodes : any) {
//-----array means json is valid if ANY of the nodes in that array exist
nodeGroup = node
nodeGroupValid = false
for (let j; = 0 j < nodeGroup.length; j++) {
for (let j = 0; j < nodeGroup.length; j++) {
nodeGroupNode = nodeGroup[j]
if (jsonNodeExists(jsonData, nodeGroupNode) === true) {
nodeGroupValid = true
@ -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 (let j = 0; j < matchCategories.length; j++) {
let matchCategory = matchCategories[j]
if (candidateCategories.includes(matchCategory) === true && reservedSlugs.includes(candidateBlogPostSlug) === false) {
relatedBlogPosts.push(candidateBlogPost)