diff --git a/components/Dropdown.js b/components/Dropdown.js index 142d6be..352e05d 100644 --- a/components/Dropdown.js +++ b/components/Dropdown.js @@ -71,7 +71,7 @@ class Dropdown extends React.Component { onClick={this.toggle} >
- {this.props.selected.name} + {this.props.selected ? this.props.selected.name : ''}
diff --git a/components/FontSelect.js b/components/FontSelect.js index c5ff603..442ba2b 100644 --- a/components/FontSelect.js +++ b/components/FontSelect.js @@ -48,7 +48,7 @@ export default class extends React.Component { } render() { - const selectedFont = FONTS.filter(font => font.id === this.props.selected)[0] + const selectedFont = FONTS.filter(font => font.id === this.props.selected)[0] || {} return (