From 72ed7df9a80ec2cb07285deeea734f2a6cbf2aa8 Mon Sep 17 00:00:00 2001 From: lawvs <18554747+lawvs@users.noreply.github.com> Date: Wed, 14 May 2025 18:21:47 +0800 Subject: [PATCH] fix(mobile): improve CJK character handling in FallbackIcon component --- apps/mobile/src/components/ui/icon/fallback-icon.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/mobile/src/components/ui/icon/fallback-icon.tsx b/apps/mobile/src/components/ui/icon/fallback-icon.tsx index 27ea4331a..c0b1e9be1 100644 --- a/apps/mobile/src/components/ui/icon/fallback-icon.tsx +++ b/apps/mobile/src/components/ui/icon/fallback-icon.tsx @@ -32,7 +32,8 @@ export const FallbackIcon = ({ const [, , , bgAccent, bgAccentLight, bgAccentUltraLight] = colors const renderedText = useMemo(() => { - const isCJK = isCJKChar(title[0]!) + const firstChar = title.at(0) + const isCJK = firstChar ? isCJKChar(firstChar) : false return ( {isCJK ? title[0] : title.slice(0, 2)}