From 15a2bfae9a1dfd376ef6fab6e334782b0d97e9d8 Mon Sep 17 00:00:00 2001 From: Brett Sun Date: Mon, 4 Jan 2016 18:06:26 +0100 Subject: [PATCH] Fix check for coa --- js/components/ascribe_detail/edition.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/js/components/ascribe_detail/edition.js b/js/components/ascribe_detail/edition.js index 191cfe87..0879dea0 100644 --- a/js/components/ascribe_detail/edition.js +++ b/js/components/ascribe_detail/edition.js @@ -233,9 +233,9 @@ let CoaDetails = React.createClass({ }, render() { - const { coa = {}, coaError } = this.props; - + const { coa, coaError } = this.props; let coaDetailElement; + if (coaError) { coaDetailElement = [

{getLangText('There was an error generating your Certificate of Authenticity.')}

, @@ -244,7 +244,7 @@ let CoaDetails = React.createClass({ {getLangText('contact us')}.

]; - } else if (coa.url_safe) { + } else if (coa && coa.url_safe) { coaDetailElement = [