From a34929fb9b2eb4103382d07671d7024f59039d52 Mon Sep 17 00:00:00 2001 From: Djorkaeff Alexandre Date: Thu, 30 Apr 2020 14:54:42 -0300 Subject: [PATCH] [FIX] Hide system messages (#2067) Co-authored-by: Diego Mello --- app/containers/UIKit/MultiSelect/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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]);