Skip to content

Commit

Permalink
Fix undefined venue
Browse files Browse the repository at this point in the history
  • Loading branch information
Twissi committed Apr 6, 2020
1 parent 2ac7970 commit 35f7cfb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions components/Events.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ function Event({ event }) {
<div className='info'>
<div className='eventName'>{name}</div>
<div className='venue'>
{venue && `${venue.name} - ${venue.city}`}
{venue && `${venue.name} ${venue.city ? ' - ' + venue.city : ''}`}
</div>
</div>
</div>
Expand Down Expand Up @@ -79,7 +79,7 @@ Event.propTypes = {
local_time: PropTypes.string.isRequired,
venue: PropTypes.shape({
name: PropTypes.string.isRequired,
city: PropTypes.string.isRequired,
city: PropTypes.string,
}),
}).isRequired,
}
Expand Down

0 comments on commit 35f7cfb

Please sign in to comment.