From 10ffa21c66062d9f61ec295cd6692775254e9373 Mon Sep 17 00:00:00 2001 From: Kirill Date: Fri, 15 May 2026 12:55:23 +0500 Subject: [PATCH] update goods --- client/src/pages/home/lib/use-product-filters.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/client/src/pages/home/lib/use-product-filters.ts b/client/src/pages/home/lib/use-product-filters.ts index 48b71a8..46edcc7 100644 --- a/client/src/pages/home/lib/use-product-filters.ts +++ b/client/src/pages/home/lib/use-product-filters.ts @@ -70,7 +70,9 @@ export function useProductFilters() { } const toCents = (v: string) => { - const n = Number(String(v).trim().replace(',', '.')) + const trimmed = String(v).trim() + if (!trimmed) return undefined + const n = Number(trimmed.replace(',', '.')) return Number.isFinite(n) && n >= 0 ? Math.round(n * 100) : undefined }