0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-24 23:48:13 -05:00

Added radix to parseInt calls in changed-prices check

no issue

- `parseInt` doesn't default to base 10 so the radix argument is required
This commit is contained in:
Kevin Ansfield 2021-05-20 09:13:31 +01:00
parent e20e5775a6
commit eebdd4a835

View file

@ -62,10 +62,10 @@ export default class MembersAccessController extends Controller {
const monthlyPrice = this.getPrice(activePrices, 'monthly');
const yearlyPrice = this.getPrice(activePrices, 'yearly');
if (monthlyPrice?.amount && parseInt(this.stripeMonthlyAmount) !== (monthlyPrice.amount / 100)) {
if (monthlyPrice?.amount && parseInt(this.stripeMonthlyAmount, 10) !== (monthlyPrice.amount / 100)) {
return true;
}
if (yearlyPrice?.amount && parseInt(this.stripeYearlyAmount) !== (yearlyPrice.amount / 100)) {
if (yearlyPrice?.amount && parseInt(this.stripeYearlyAmount, 10) !== (yearlyPrice.amount / 100)) {
return true;
}
}