Skip to content

Commit

Permalink
createNestedObject undefined check
Browse files Browse the repository at this point in the history
  • Loading branch information
nikoloza committed Feb 26, 2025
1 parent dac3444 commit 09a4aff
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/utils/object.js
Original file line number Diff line number Diff line change
Expand Up @@ -727,7 +727,7 @@ export const createNestedObject = (arr, lastValue) => {
if (!obj[value]) {
obj[value] = {}
}
if (index === arr.length - 1 && lastValue) {
if (index === arr.length - 1 && lastValue !== undefined) {
obj[value] = lastValue
}
return obj[value]
Expand Down

0 comments on commit 09a4aff

Please sign in to comment.