Skip to content

Commit ebac3ca

Browse files
Copilothotlong
andcommitted
fix: handle NaN from empty number input in ActionParamDialog
Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
1 parent 7dd0547 commit ebac3ca

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

apps/console/src/components/ActionParamDialog.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ export function ActionParamDialog({ state, onOpenChange }: ActionParamDialogProp
141141
id={param.name}
142142
type="number"
143143
value={values[param.name] ?? ''}
144-
onChange={(e) => updateValue(param.name, e.target.valueAsNumber)}
144+
onChange={(e) => updateValue(param.name, e.target.value === '' ? undefined : e.target.valueAsNumber)}
145145
placeholder={param.placeholder}
146146
className={errors[param.name] ? 'border-destructive' : ''}
147147
/>

0 commit comments

Comments
 (0)