mirror of https://github.com/langgenius/dify.git
chore: fix categoriesMap[category] undefined
This commit is contained in:
parent
85377d13fc
commit
786f2d9bf6
|
|
@ -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 || ''
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue