From 6851f29f751b705e6b48c53f1f9705ab92c7d068 Mon Sep 17 00:00:00 2001 From: shanmite Date: Sat, 11 Dec 2021 18:18:43 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=8F=8F=E8=BF=B0=E4=B8=AD=E5=87=BA?= =?UTF-8?q?=E7=8E=B0undefined(#88)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/core/searcher.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/core/searcher.js b/lib/core/searcher.js index 0cf0e5a..d329e5b 100644 --- a/lib/core/searcher.js +++ b/lib/core/searcher.js @@ -75,10 +75,10 @@ function parseDynamicCard(dynamic_detail_card) { obj.ctrl = (extend_json && strToJson(extend_json).ctrl) || []; /* 是否有官方抽奖 */ obj.hasOfficialLottery = extension && extension.lott && true; - /* 转发者的描述 后两个分别是视频动态的描述和视频本身的描述*/ + /* 转发者的描述 纯文字内容 图片动态描述 后两个分别是视频动态的描述和视频本身的描述*/ obj.description = - (item && (item.content + item.description)) - || (cardToJson.dynamic + cardToJson.desc) + (item && (item.content || '' + item.description || '')) + || (cardToJson.dynamic || '' + cardToJson.desc || '') || ''; if (obj.type === 1) { const { origin_extension, origin } = cardToJson @@ -98,8 +98,8 @@ function parseDynamicCard(dynamic_detail_card) { obj.origin_uname = (user && (user.name || user.uname)) || ''; /* 被转发者的描述 */ obj.origin_description = - (item && (item.content + item.description)) - || (originToJson.dynamic + originToJson.desc) + (item && (item.content || '' + item.description || '')) + || (originToJson.dynamic || '' + originToJson.desc || '') || ''; }