From ac4d209879b64a64d7df600a2b01c8164fe726c5 Mon Sep 17 00:00:00 2001 From: Viren070 Date: Sun, 13 Jul 2025 18:50:27 +0100 Subject: [PATCH] fix: ensure number types always have integer step of at least 1 --- .../frontend/src/components/shared/template-option.tsx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/packages/frontend/src/components/shared/template-option.tsx b/packages/frontend/src/components/shared/template-option.tsx index 10f0435e..419e3ada 100644 --- a/packages/frontend/src/components/shared/template-option.tsx +++ b/packages/frontend/src/components/shared/template-option.tsx @@ -115,7 +115,13 @@ const TemplateOption: React.FC = ({ onChange(value) } required={required} - step={constraints?.max ? constraints?.max / 100 : 1} + step={ + constraints?.max + ? Math.floor(constraints?.max / 100) > 0 + ? Math.floor(constraints?.max / 100) + : 1 + : 1 + } disabled={isDisabled} /> {description && (