Set unknown

This commit is contained in:
Nicolas Mowen 2025-10-22 07:05:30 -06:00
parent 8631dcfe8b
commit 60462b9b45

View File

@ -219,10 +219,10 @@ export function GroupedClassificationCard({
const bestTyped: ClassificationItemData = best; const bestTyped: ClassificationItemData = best;
return { return {
...bestTyped, ...bestTyped,
name: event ? (event.sub_label ?? "") : bestTyped.name, name: event ? (event.sub_label ?? t("details.unknown")) : bestTyped.name,
score: event?.data?.sub_label_score || bestTyped.score, score: event?.data?.sub_label_score || bestTyped.score,
}; };
}, [group, event]); }, [group, event, t]);
const bestScoreStatus = useMemo(() => { const bestScoreStatus = useMemo(() => {
if (!bestItem?.score || !threshold) { if (!bestItem?.score || !threshold) {