mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-25 20:03:12 +03:00
Fixed finding newly created zero-amount price
no-issue The condition in the find statement was incorrecly referring to the subscription rather than the price for the subscription.
This commit is contained in:
parent
12d4e42bb1
commit
d5269d8a9a
@ -643,8 +643,8 @@ module.exports = class MemberRepository {
|
|||||||
amount: 0
|
amount: 0
|
||||||
}]
|
}]
|
||||||
}, options)).toJSON();
|
}, options)).toJSON();
|
||||||
zeroValuePrice = product.stripePrices.find((price) => {
|
zeroValuePrice = product.stripePrices.find((p) => {
|
||||||
return price.currency.toLowerCase() === subscription.get('currency').toLowerCase() && price.amount === 0;
|
return p.currency.toLowerCase() === price.get('currency').toLowerCase() && p.amount === 0;
|
||||||
});
|
});
|
||||||
zeroValuePrices.push(zeroValuePrice);
|
zeroValuePrices.push(zeroValuePrice);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user