Skip to content

Commit

Permalink
Fixed small bug in assets
Browse files Browse the repository at this point in the history
  • Loading branch information
caioaletroca committed Nov 11, 2024
1 parent b66568b commit 000e4ad
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/app/(routes)/ledgers/[id]/assets/assets-sheet.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ export const AssetsSheet = ({

React.useEffect(() => {
if (mode === 'edit' && !isNil(data)) {
setMetadataEnabled(Object.entries(data.metadata).length > 0)
setMetadataEnabled(Object.entries(data.metadata ?? {}).length > 0)
form.reset(data, { keepDefaultValues: true })
} else {
setMetadataEnabled(false)
Expand Down

0 comments on commit 000e4ad

Please sign in to comment.