1
0
mirror of https://github.com/franjsco/tick3t synced 2024-12-27 09:53:37 +01:00

improvement: check props

This commit is contained in:
Francesco Esposito 2019-08-03 16:46:37 +02:00
parent a552c67602
commit 93a6c0acef

View File

@ -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