mirror of
https://github.com/franjsco/tick3t
synced 2025-06-05 22:19:18 +02:00
improvement: check props
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user