Skip to content

Commit

Permalink
fix jest fail caused by FormSelection.props.options == null
Browse files Browse the repository at this point in the history
  • Loading branch information
ahmedhamidawan committed Apr 16, 2024
1 parent 0f8c379 commit 26844a1
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion client/src/components/Form/Elements/FormSelection.vue
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,10 @@ watch(
}
if (newValue === "none") {
if ((Array.isArray(props.value) && props.value.length >= 15) || props.options.length >= 500) {
if (
(Array.isArray(props.value) && props.value.length >= 15) ||
(props.options && props.options.length >= 500)
) {
useMany.value = true;
} else {
useMany.value = false;
Expand Down

0 comments on commit 26844a1

Please sign in to comment.