From 14d92e1c5201da54170adb3884c6972c85b899dc Mon Sep 17 00:00:00 2001 From: Rish Date: Tue, 7 Jul 2020 19:56:25 +0530 Subject: [PATCH] Handled card info for complimentary plan closes https://github.com/TryGhost/members.js/issues/52 - No card details are on file for complimentary plan, show Complimentary instead --- ghost/portal/src/components/pages/AccountHomePage.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ghost/portal/src/components/pages/AccountHomePage.js b/ghost/portal/src/components/pages/AccountHomePage.js index af23633efe..a44b53055f 100644 --- a/ghost/portal/src/components/pages/AccountHomePage.js +++ b/ghost/portal/src/components/pages/AccountHomePage.js @@ -146,7 +146,10 @@ class PaidAccountHomePage extends React.Component { } getCardLabel({defaultCardLast4}) { - return `**** **** **** ${defaultCardLast4}`; + if (defaultCardLast4) { + return `**** **** **** ${defaultCardLast4}`; + } + return `Complimentary`; } openEditProfile() {