Skip to content

Commit

Permalink
chore: check value is an array before checking length
Browse files Browse the repository at this point in the history
  • Loading branch information
sagarchoudhary96 authored Oct 23, 2023
1 parent cc20c52 commit 68afd09
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ export const ArrayField = ({
ref={provided.innerRef}
className={getClassName({
isDraggingFrom: !!snapshot.draggingFromThisWith,
hasItems: value.length > 0,
hasItems: Array.isArray(value) && value.length > 0,
})}
>
{Array.isArray(value) && value.length > 0
Expand Down

0 comments on commit 68afd09

Please sign in to comment.