Skip to content

Commit

Permalink
Fix small reordering bug
Browse files Browse the repository at this point in the history
  • Loading branch information
youknowriad committed Dec 3, 2024
1 parent 06584ab commit 8aeeaa8
Showing 1 changed file with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -333,8 +333,10 @@ function RegularFieldItem( {
<FieldItem
field={ field }
isVisible={ isVisible }
isFirst={ !! index && index < 1 }
isLast={ !! index && index === visibleFieldIds.length - 1 }
isFirst={ index !== undefined && index < 1 }
isLast={
index !== undefined && index === visibleFieldIds.length - 1
}
onToggleVisibility={ () => {
onChangeView( {
...view,
Expand All @@ -357,7 +359,7 @@ function RegularFieldItem( {
}, 50 );
} }
onMoveUp={
index
index !== undefined
? () => {
onChangeView( {
...view,
Expand All @@ -375,7 +377,7 @@ function RegularFieldItem( {
: undefined
}
onMoveDown={
index
index !== undefined
? () => {
onChangeView( {
...view,
Expand Down

0 comments on commit 8aeeaa8

Please sign in to comment.