Skip to content

Commit

Permalink
fix: setValue should work with null (#608)
Browse files Browse the repository at this point in the history
  • Loading branch information
edmundhung committed Apr 28, 2024
1 parent 1a11a27 commit c005590
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/conform-dom/formdata.ts
Expand Up @@ -120,7 +120,8 @@ export function setValue(
const nextKey = paths[index + 1];
const newValue =
index != lastIndex
? Object.prototype.hasOwnProperty.call(pointer, key)
? Object.prototype.hasOwnProperty.call(pointer, key) &&
pointer[key] !== null
? pointer[key]
: typeof nextKey === 'number'
? []
Expand Down

0 comments on commit c005590

Please sign in to comment.