From e5e0a0a838c5d899ce8ea8f35298dcd463af0a2b Mon Sep 17 00:00:00 2001 From: Chenyang Shi Date: Mon, 25 Feb 2019 11:31:04 +0800 Subject: [PATCH] fix each.find is not a function (#1603) * update bug report template * fix each.find is not a function --- lib/routes/hexo/yilia.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/routes/hexo/yilia.js b/lib/routes/hexo/yilia.js index 964f673fa..07af62e4f 100644 --- a/lib/routes/hexo/yilia.js +++ b/lib/routes/hexo/yilia.js @@ -9,9 +9,13 @@ module.exports = async (ctx) => { const list = $('.archive-type-post'); const item = await Promise.all( Array.from(list).map(async (each) => { - const itemLink = each.find('.archive-article-title').attr('href'); + const itemLink = $(each) + .find('.archive-article-title') + .attr('href'); const item = { - title: each.find('.archive-article-title').text(), + title: $(each) + .find('.archive-article-title') + .text(), link: encodeURI(`${url}${itemLink}`), }; const key = item.link;