mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-24 23:48:13 -05:00
Fixed unsaved changes warning for prices when they've already been saved
no issue - amount properties on the controller are set to strings rather than numbers so the comparison would still be false even if the "numbers" matched
This commit is contained in:
parent
6339770a67
commit
3bed117b57
1 changed files with 2 additions and 2 deletions
|
@ -62,10 +62,10 @@ export default class MembersAccessController extends Controller {
|
||||||
const monthlyPrice = this.getPrice(activePrices, 'monthly');
|
const monthlyPrice = this.getPrice(activePrices, 'monthly');
|
||||||
const yearlyPrice = this.getPrice(activePrices, 'yearly');
|
const yearlyPrice = this.getPrice(activePrices, 'yearly');
|
||||||
|
|
||||||
if (monthlyPrice?.amount && this.stripeMonthlyAmount !== (monthlyPrice.amount / 100)) {
|
if (monthlyPrice?.amount && parseInt(this.stripeMonthlyAmount) !== (monthlyPrice.amount / 100)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if (yearlyPrice?.amount && this.stripeYearlyAmount !== (yearlyPrice.amount / 100)) {
|
if (yearlyPrice?.amount && parseInt(this.stripeYearlyAmount) !== (yearlyPrice.amount / 100)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue