Fix removing last item from segments list

[MAILPOET-3073]
This commit is contained in:
Ján Mikláš
2020-10-21 16:17:37 +02:00
committed by Veljko V
parent df3cbd78b2
commit c3e5b5fff2

View File

@@ -26,7 +26,7 @@ export default (props: Props) => {
placeholder={props.placeholder} placeholder={props.placeholder}
options={segments} options={segments}
onChange={(selectedValues: any) => { onChange={(selectedValues: any) => {
props.setValue(selectedValues.map((x: any) => x.value)); props.setValue((selectedValues || []).map((x: any) => x.value));
}} }}
/> />
); );