mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-05 01:40:21 +03: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
@ -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…
Reference in New Issue
Block a user