bug: enum Select crashes when selecting the empty value (via #5463)
* add failing tests * fix property access * @babel/plugin-proposal-optional-chaining
This commit is contained in:
@@ -186,7 +186,7 @@ export class Select extends React.Component {
|
||||
|
||||
render(){
|
||||
let { allowedValues, multiple, allowEmptyValue, disabled } = this.props
|
||||
let value = this.state.value.toJS ? this.state.value.toJS() : this.state.value
|
||||
let value = this.state.value?.toJS?.() || this.state.value
|
||||
|
||||
return (
|
||||
<select className={this.props.className} multiple={ multiple } value={value} onChange={ this.onChange } disabled={disabled} >
|
||||
|
||||
Reference in New Issue
Block a user