diff --git a/app/containers/UIKit/MultiSelect/index.js b/app/containers/UIKit/MultiSelect/index.js index 6aa671a3..6cd584b1 100644 --- a/app/containers/UIKit/MultiSelect/index.js +++ b/app/containers/UIKit/MultiSelect/index.js @@ -43,14 +43,14 @@ export const MultiSelect = React.memo(({ inputStyle, theme }) => { - const [selected, select] = useState(values || []); + const [selected, select] = useState(Array.isArray(values) ? values : []); const [open, setOpen] = useState(false); const [search, onSearchChange] = useState(''); const [currentValue, setCurrentValue] = useState(''); const [showContent, setShowContent] = useState(false); useEffect(() => { - if (values) { + if (Array.isArray(values)) { select(values); } }, [values]);