Open hoochanlon opened 6 years ago
ERROR Cannot read property 'forEach' of undefined TypeError: Cannot read property 'forEach' of undefined at Object. (H:\blog\themes\next\scripts\related_posts.js:4:22)
hexo.extend.helper.register('related_posts', function(currentPost, allPosts){ var relatedPosts = []; currentPost.tags.forEach(function (tag) { allPosts.forEach(function (post) { if (isTagRelated(tag.name, post.tags)) { var relatedPost = { title: post.title, path: post.path, weight: 1 };
ERROR Cannot read property 'forEach' of undefined TypeError: Cannot read property 'forEach' of undefined at Object. (H:\blog\themes\next\scripts\related_posts.js:4:22)