From 1626fd93232ab596fd8aa9d1a34d064add2f3ac1 Mon Sep 17 00:00:00 2001 From: Aaron Date: Sat, 11 May 2024 17:18:24 +0700 Subject: [PATCH] fix: serialize for bigint (#613) --- 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 {