Fixed preexisting member name check

refs 1dc0b36b56

- The name can also be 'null' so the check should take that into account
This commit is contained in:
Nazar Gargol 2020-01-20 15:50:52 +07:00
parent 47f5ca6625
commit 6c7139b1fe

View File

@ -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});
}