From 4ffc72c97d8cf4d7a549c6a7240ea7ac745d032c Mon Sep 17 00:00:00 2001 From: shin Date: Thu, 13 Aug 2026 19:06:56 +0300 Subject: [PATCH] . --- plugins/you-bar-plus/src/patches/youBarButtons.tsx | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/plugins/you-bar-plus/src/patches/youBarButtons.tsx b/plugins/you-bar-plus/src/patches/youBarButtons.tsx index d72fb68..7f00ad4 100644 --- a/plugins/you-bar-plus/src/patches/youBarButtons.tsx +++ b/plugins/you-bar-plus/src/patches/youBarButtons.tsx @@ -48,12 +48,17 @@ export default function patchYouBarButtons(): () => void { const cleanups: (() => void)[] = []; patchCreateElement(cleanups); - // Matches the notification button reliably even if Discord localizes or changes accessibilityLabel + // Matches the notification button reliably even if Discord localizes or changes accessibilityLabel, + // safely guarding BellIcon so undefined doesn't match iconless props. registerPropsTransform( (props) => { if (!storage.showInboxButton) return false; const label = props?.accessibilityLabel?.toLowerCase(); - return label === "notifications" || label === "inbox" || props?.icon === BellIcon; + return ( + label === "notifications" || + label === "inbox" || + (BellIcon != null && props?.icon === BellIcon) + ); }, (props) => ({ ...props,