fix(route): threads profile pic (#14061)

This commit is contained in:
Tony 2023-12-16 16:49:23 +00:00 committed by GitHub
parent f7f8b7a8e7
commit c576d1a931
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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,
};