Skip to content

Commit

Permalink
Fixed #1446 - MultiSelect: error when selecting option with null value
Browse files Browse the repository at this point in the history
  • Loading branch information
mertsincan committed Sep 19, 2020
1 parent a1d0cd8 commit da11904
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/multiselect/MultiSelect.js
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down

0 comments on commit da11904

Please sign in to comment.