From 4a1ac73420e917459c9c831a29518b0efe3ddb65 Mon Sep 17 00:00:00 2001 From: kmmiio99o Date: Sat, 7 Feb 2026 13:57:33 +0100 Subject: [PATCH] fix: TypeError: undefined is not a function --- plugins/Commands/settings/components/Header.tsx | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/plugins/Commands/settings/components/Header.tsx b/plugins/Commands/settings/components/Header.tsx index 0d40735..467a318 100644 --- a/plugins/Commands/settings/components/Header.tsx +++ b/plugins/Commands/settings/components/Header.tsx @@ -130,8 +130,13 @@ export default function Header() { animated = hasAnimatedAvatar; } // Fall back to default avatar - else if (getDefaultAvatarURL) { - url = getDefaultAvatarURL(currentUser); + else if (getDefaultAvatarURL && typeof getDefaultAvatarURL === 'function') { + try { + url = getDefaultAvatarURL(currentUser); + } catch (error) { + console.error('Error getting default avatar URL:', error); + url = null; + } } // Last resort: Construct Discord CDN URL else if (currentUser.avatar) { @@ -219,7 +224,6 @@ export default function Header() { /> {isAnimatedAvatar && ( - GIF )}