diff --git a/components/Navigation.tsx b/components/Navigation.tsx index 5669fb3..5ef2f57 100644 --- a/components/Navigation.tsx +++ b/components/Navigation.tsx @@ -27,12 +27,12 @@ async function destroySession() { function getAvatarUrl(userData: { [k: string]: any }): string { const BASE = "https://cdn.discordapp.com/"; - if (!userData.id || typeof window["BigInt"] === "undefined") return ""; + if (userData.avatar) + return BASE + `avatars/${userData.id}/${userData.avatar}`; - if (!userData.avatar) - return BASE + `embed/avatars/${(BigInt(userData.id) >> 22n) % 6n}.png`; + if (!userData.id || typeof window["BigInt"] === "undefined") return ""; - return BASE + `avatars/${userData.id}/${userData.avatar}`; + return BASE + `embed/avatars/${(BigInt(userData.id) >> 22n) % 6n}.png`; } export default function (props: {