From 3a170d9c18acb60f8d59c2017b99942005bdddba Mon Sep 17 00:00:00 2001 From: Aaron Reisman Date: Sun, 28 Apr 2024 13:15:17 -0700 Subject: [PATCH] fix: serialize for bigint --- packages/conform-dom/submission.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/conform-dom/submission.ts b/packages/conform-dom/submission.ts index 8ea699bc..841819b6 100644 --- a/packages/conform-dom/submission.ts +++ b/packages/conform-dom/submission.ts @@ -542,7 +542,10 @@ export function serialize(defaultValue: Schema): FormValue { } else if (typeof defaultValue === 'boolean') { // @ts-expect-error FIXME return defaultValue ? 'on' : undefined; - } else if (typeof defaultValue === 'number') { + } else if ( + typeof defaultValue === 'number' || + typeof defaultValue === 'bigint' + ) { // @ts-expect-error FIXME return defaultValue.toString(); } else {