From 6d8312437657b4b524e0d8f382634d04eb225544 Mon Sep 17 00:00:00 2001 From: Tom Hacohen Date: Thu, 7 Dec 2017 22:59:43 +0000 Subject: [PATCH] Make the contact component throw an error if contact is undefined. --- src/Contact.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Contact.tsx b/src/Contact.tsx index 645f453..d18b3c3 100644 --- a/src/Contact.tsx +++ b/src/Contact.tsx @@ -15,7 +15,7 @@ class Contact extends React.Component { render() { if (this.props.contact === undefined) { - return (
Loading
); + throw Error('Contact should be defined!'); } const contact = this.props.contact;