From da1190480ad408fe16d12f89662bab1ac5feab67 Mon Sep 17 00:00:00 2001 From: mertsincan Date: Sat, 19 Sep 2020 23:10:02 +0300 Subject: [PATCH] Fixed #1446 - MultiSelect: error when selecting option with null value --- src/components/multiselect/MultiSelect.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/multiselect/MultiSelect.js b/src/components/multiselect/MultiSelect.js index 2aa7401197..3bb4099f6e 100644 --- a/src/components/multiselect/MultiSelect.js +++ b/src/components/multiselect/MultiSelect.js @@ -471,11 +471,11 @@ export class MultiSelect extends Component { } getOptionLabel(option) { - return this.props.optionLabel ? ObjectUtils.resolveFieldData(option, this.props.optionLabel) : (option['label'] !== undefined ? option['label'] : option); + return this.props.optionLabel ? ObjectUtils.resolveFieldData(option, this.props.optionLabel) : (option && option['label'] !== undefined ? option['label'] : option); } getOptionValue(option) { - return this.props.optionValue ? ObjectUtils.resolveFieldData(option, this.props.optionValue) : (option['value'] !== undefined ? option['value'] : option); + return this.props.optionValue ? ObjectUtils.resolveFieldData(option, this.props.optionValue) : (option && option['value'] !== undefined ? option['value'] : option); } isEmpty() {