Fix: Prevent rendering 0 for rating

This commit is contained in:
gpt-engineer-app[bot]
2025-09-29 15:30:45 +00:00
parent dd3ab248d2
commit 194af3308f

View File

@@ -288,7 +288,7 @@ export function AutocompleteSearch({
)}
</div>
</div>
{(item as SearchResult).rating && (item as SearchResult).rating! > 0.0 && (
{((item as SearchResult).rating ?? 0) > 0 && (
<div className="flex items-center gap-1 ml-3">
<Zap className="w-3 h-3 text-yellow-500" />
<span className="text-sm font-medium">{(item as SearchResult).rating!.toFixed(1)}</span>