We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 98301cf commit 404288bCopy full SHA for 404288b
src/components/Select2.js
@@ -50,12 +50,11 @@ export default class Select2 extends Component {
50
return (
51
<select multiple={this.props.multiple}>
52
{this.props.data.map((item, k) => {
53
- if(typeof item === 'string' || ((!!item && typeof item === 'object') && Object.prototype.toString.call(item) === '[object String]')) {
+ if (typeof item === 'string' ||
54
+ ((!!item && typeof item === 'object') && Object.prototype.toString.call(item) === '[object String]')) {
55
return (<option key={'option-' + k}>{item}</option>);
56
}
- else {
57
- return (<option key={'option-' + k} value={item.id}>{item.text}</option>);
58
- }
+ return (<option key={'option-' + k} value={item.id}>{item.text}</option>);
59
})}
60
</select>
61
);
0 commit comments