Make the contact component throw an error if contact is undefined.

master
Tom Hacohen 7 years ago
parent 3883cbad1c
commit 6d83124376

@ -15,7 +15,7 @@ class Contact extends React.Component {
render() { render() {
if (this.props.contact === undefined) { if (this.props.contact === undefined) {
return (<div>Loading</div>); throw Error('Contact should be defined!');
} }
const contact = this.props.contact; const contact = this.props.contact;

Loading…
Cancel
Save