fix: Cannot read properties of null (reading 'is_liked')

This commit is contained in:
shanmite 2024-03-25 10:43:38 +08:00
parent eafa7c7ae4
commit d9dba6f0ff

View File

@ -63,7 +63,7 @@ function parseDynamicCard(dynamic_detail_card) {
/**临时储存单个动态中的信息 */ /**临时储存单个动态中的信息 */
let obj = {}; let obj = {};
const { desc, card, extension, extend_json = "{}", display = {} } = dynamic_detail_card const { desc, card, extension, extend_json = "{}", display = {} } = dynamic_detail_card
, { is_liked = 1, user_profile = {} } = desc , { is_liked = 1, user_profile = {} } = desc || {}
, { info = {} } = user_profile , { info = {} } = user_profile
, cardToJson = strToJson(card) , cardToJson = strToJson(card)
, extendjsonToJson = strToJson(extend_json) , extendjsonToJson = strToJson(extend_json)