Skip to content

Commit

Permalink
Update renderCard.tsx
Browse files Browse the repository at this point in the history
hotfix for null clan info
  • Loading branch information
cnrad authored Sep 25, 2024
1 parent 3158aaf commit 052ebbf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/renderCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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`
);
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 052ebbf

Please sign in to comment.