From ac4ca43be671b6fb93f6dc3194028114fd46334d Mon Sep 17 00:00:00 2001 From: Index Date: Sat, 29 Jun 2024 00:12:21 -0500 Subject: [PATCH] fix: avatar dimension toggle working with all badges --- js/account/profile.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/js/account/profile.js b/js/account/profile.js index f59925e..8063504 100755 --- a/js/account/profile.js +++ b/js/account/profile.js @@ -115,7 +115,11 @@ if (Username) { if (CustomBadge === null) { AvatarCard.children[0].insertBefore(AvatarImage, AvatarCard.getElementsByClassName('user-badges')[0]) } else { - AvatarCard.children[0].insertBefore(AvatarImage, CustomBadge.parentElement) + try { + AvatarCard.children[0].insertBefore(AvatarImage, CustomBadge) + } catch(error) { + AvatarCard.children[0].insertBefore(AvatarImage, CustomBadge.parentElement) + } } ToggleButton.children[0].classList = 'toggleIcn fad fa-360-degrees'