diff --git a/web-console/src/components/auto-form/auto-form.tsx b/web-console/src/components/auto-form/auto-form.tsx index 357046876af..6583249c5a6 100644 --- a/web-console/src/components/auto-form/auto-form.tsx +++ b/web-console/src/components/auto-form/auto-form.tsx @@ -84,6 +84,7 @@ export interface Field { } function toNumberOrUndefined(n: unknown): number | undefined { + if (n == null) return; const r = Number(n); return isNaN(r) ? undefined : r; }