mirror of
https://github.com/langgenius/dify.git
synced 2026-03-06 16:16:38 +08:00
chore: fix categoriesMap[category] undefined
This commit is contained in:
@ -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<string, string> | undefined) =>
|
||||
obj?.[locale] || obj?.['en-US'] || obj?.en_US || ''
|
||||
|
||||
|
||||
Reference in New Issue
Block a user