mirror of
https://github.com/NohamR/lanyard-profile-readme.git
synced 2026-05-25 04:17:18 +00:00
Update renderCard.tsx
hotfix for null clan info
This commit is contained in:
@@ -109,7 +109,7 @@ const renderCard = async (body: LanyardTypes.Root, params: Parameters): Promise<
|
||||
}
|
||||
|
||||
let clanBadge: string;
|
||||
if (data.discord_user.clan) {
|
||||
if (data.discord_user.clan.) {
|
||||
clanBadge = await encodeBase64(
|
||||
`https://cdn.discordapp.com/clan-badges/${data.discord_user.clan.identity_guild_id}/${data.discord_user.clan.badge}.png?size=16`
|
||||
);
|
||||
@@ -242,7 +242,7 @@ const renderCard = async (body: LanyardTypes.Root, params: Parameters): Promise<
|
||||
}
|
||||
</h1>
|
||||
|
||||
${hideClan ? "" : `
|
||||
${hideClan || !data.discord_user.clan.tag && !data.discord_user.clan.badge ? "" : `
|
||||
<span style="
|
||||
background-color: ${clanBackgroundColor};
|
||||
border-radius: 0.375rem;
|
||||
|
||||
Reference in New Issue
Block a user