From a223763bbb4aa36d18f3a6c72de65bca84ca457e Mon Sep 17 00:00:00 2001 From: Henry Wang Date: Mon, 8 Jul 2019 04:48:30 +0100 Subject: [PATCH] fix: remove a redundant condition check (#2576) * fix: remove a redundant condition check * fix: remove a redundant condition check --- lib/routes/juejin/category.js | 2 +- lib/routes/juejin/tag.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/routes/juejin/category.js b/lib/routes/juejin/category.js index 63dc13711c..2c04f16c20 100644 --- a/lib/routes/juejin/category.js +++ b/lib/routes/juejin/category.js @@ -29,7 +29,7 @@ module.exports = async (ctx) => { let originalData = []; if (response.data.d && response.data.d.entrylist) { - originalData = response.data.d && response.data.d.entrylist.slice(0, 5); + originalData = response.data.d.entrylist.slice(0, 5); } const resultItems = await util.ProcessFeed(originalData, ctx.cache); diff --git a/lib/routes/juejin/tag.js b/lib/routes/juejin/tag.js index 9d1f71da4f..28a605e6f3 100644 --- a/lib/routes/juejin/tag.js +++ b/lib/routes/juejin/tag.js @@ -29,7 +29,7 @@ module.exports = async (ctx) => { let originalData = []; if (response.data.d && response.data.d.entrylist) { - originalData = response.data.d && response.data.d.entrylist.slice(0, 10); + originalData = response.data.d.entrylist.slice(0, 10); } const resultItems = await util.ProcessFeed(originalData, ctx.cache);