From 6c7139b1fea93e986a0047050b4b976b2615695d Mon Sep 17 00:00:00 2001 From: Nazar Gargol Date: Mon, 20 Jan 2020 15:50:52 +0700 Subject: [PATCH] Fixed preexisting member name check refs https://github.com/TryGhost/Members/commit/1dc0b36b566615c98a5f96cc67badf6cfe9e6420 - The name can also be 'null' so the check should take that into account --- ghost/members-api/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ghost/members-api/index.js b/ghost/members-api/index.js index c36a8c7d5b..d3c83dbeec 100644 --- a/ghost/members-api/index.js +++ b/ghost/members-api/index.js @@ -223,7 +223,7 @@ module.exports = function MembersApi({ const payerName = _.get(customer, 'subscriptions.data[0].default_payment_method.billing_details.name'); - if (payerName && member.name === '') { + if (payerName && !member.name) { await users.update({name: payerName}, {id: member.id}); }