mirror of
https://github.com/franjsco/tick3t
synced 2024-12-27 09:53:37 +01:00
improvement: check props
This commit is contained in:
parent
a552c67602
commit
93a6c0acef
@ -4,9 +4,12 @@ import { Input } from 'reactstrap';
|
||||
|
||||
const DropDown = (props) => {
|
||||
let options = props.options;
|
||||
options = options.map((opt) => {
|
||||
return <option key={opt.name} value={opt.name}>{opt.value}</option>
|
||||
});
|
||||
if (options) {
|
||||
options = options.map((opt) => {
|
||||
return <option key={opt.name} value={opt.name}>{opt.value}</option>
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
return (
|
||||
<Input
|
||||
|
Loading…
Reference in New Issue
Block a user