From c576d1a931d4b6ddf57be2ed778ec7bd1b913343 Mon Sep 17 00:00:00 2001 From: Tony Date: Sat, 16 Dec 2023 16:49:23 +0000 Subject: [PATCH] fix(route): threads profile pic (#14061) --- lib/v2/threads/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/v2/threads/index.js b/lib/v2/threads/index.js index f12944798..b2554ec8b 100644 --- a/lib/v2/threads/index.js +++ b/lib/v2/threads/index.js @@ -66,7 +66,7 @@ module.exports = async (ctx) => { ctx.state.data = { title: `${userData.full_name} (@${userData.username}) on Threads`, link: profileUrl(user), - image: userData.hd_profile_pic_versions.sort((a, b) => b.width - a.width)[0].url, + image: userData.hd_profile_pic_versions?.sort((a, b) => b.width - a.width)[0].url ?? userData.profile_pic_url, description: userData.biography, item: items, };