From 786f2d9bf64b560f2b9168d8e20ee78d429f0eac Mon Sep 17 00:00:00 2001 From: Joel Date: Fri, 22 Nov 2024 10:39:22 +0800 Subject: [PATCH] chore: fix categoriesMap[category] undefined --- web/app/components/plugins/card/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/app/components/plugins/card/index.tsx b/web/app/components/plugins/card/index.tsx index 2d66e1b872..0d4cae9e89 100644 --- a/web/app/components/plugins/card/index.tsx +++ b/web/app/components/plugins/card/index.tsx @@ -44,7 +44,7 @@ const Card = ({ const locale = localeFromProps ? getLanguage(localeFromProps) : defaultLocale const { categoriesMap } = useCategories() const { type, category, name, org, label, brief, icon, verified } = payload - const cornerMark = type !== 'plugin' ? type : categoriesMap[category].label + const cornerMark = type !== 'plugin' ? type : categoriesMap[category]?.label const getLocalizedText = (obj: Record | undefined) => obj?.[locale] || obj?.['en-US'] || obj?.en_US || ''