Skip to content

Commit

Permalink
fix: serialize for bigint (#613)
Browse files Browse the repository at this point in the history
  • Loading branch information
lifeiscontent committed May 11, 2024
1 parent 91af785 commit 1626fd9
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/conform-dom/submission.ts
Original file line number Diff line number Diff line change
Expand Up @@ -542,7 +542,10 @@ export function serialize<Schema>(defaultValue: Schema): FormValue<Schema> {
} 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 {
Expand Down

0 comments on commit 1626fd9

Please sign in to comment.