From c46af9425b97bc5d6c4ac21d1545c53312fb2599 Mon Sep 17 00:00:00 2001 From: HoonBaek Date: Wed, 27 Oct 2021 11:59:52 +0900 Subject: [PATCH] Apply name first before applying url --- src/ui/QuoteMessage/index.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ui/QuoteMessage/index.tsx b/src/ui/QuoteMessage/index.tsx index 24c423386..a9437eae0 100644 --- a/src/ui/QuoteMessage/index.tsx +++ b/src/ui/QuoteMessage/index.tsx @@ -42,7 +42,7 @@ export default function QuoteMessage({ const [isThumbnailLoaded, setThumbnailLoaded] = useState(false); const { stringSet } = useContext(LocalizationContext); const uikitFileTypes = getUIKitFileTypes(); - const splitUrl = parentMessageUrl.split('/'); + const splitFileName = parentMessage?.name ? parentMessage.name.split('/') : parentMessageUrl.split('/'); return (
- {truncateString(splitUrl[splitUrl.length - 1])} + {truncateString(splitFileName[splitFileName.length - 1])}
)}