From f6e19c39f20c14d3fd0f15afe70d479c61841fe5 Mon Sep 17 00:00:00 2001 From: Ahmed Awan Date: Tue, 16 Apr 2024 11:16:38 -0500 Subject: [PATCH] remove double ternary op --- .../Form/Elements/FormSelectMany/FormSelectMany.vue | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/client/src/components/Form/Elements/FormSelectMany/FormSelectMany.vue b/client/src/components/Form/Elements/FormSelectMany/FormSelectMany.vue index 6af677ccb784..0c762ae90bd4 100644 --- a/client/src/components/Form/Elements/FormSelectMany/FormSelectMany.vue +++ b/client/src/components/Form/Elements/FormSelectMany/FormSelectMany.vue @@ -65,7 +65,13 @@ const searchRegex = computed(() => { /** Wraps value prop so it can be set, and always returns an array */ const selected = computed({ get() { - return props.value === null ? [] : Array.isArray(props.value) ? props.value : [props.value]; + if (props.value === null) { + return []; + } else if (Array.isArray(props.value)) { + return props.value; + } else { + return [props.value]; + } }, set(value) { emit("input", value);