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

Fixed portal plans change not triggering recompute

no refs

Portal plan settings are updated on the membership page when the plans are changed, but its not reflected in Portal settings because we were not updating the array the ember way.
This commit is contained in:
Rishabh 2021-05-19 20:19:39 +05:30
parent d706d9f19b
commit 4e6051a5bd

View file

@ -314,12 +314,12 @@ export default class MembersAccessController extends Controller {
const currentYearlyPriceId = this.settings.get('membersYearlyPriceId');
if (portalPlans.includes(currentMontlyPriceId)) {
portalPlans = portalPlans.filter(priceId => priceId !== currentMontlyPriceId);
portalPlans.push(monthlyPriceId);
portalPlans.pushObject(monthlyPriceId);
}
if (portalPlans.includes(currentYearlyPriceId)) {
portalPlans = portalPlans.filter(priceId => priceId !== currentYearlyPriceId);
portalPlans.push(yearlyPriceId);
portalPlans.pushObject(yearlyPriceId);
}
this.settings.set('portalPlans', portalPlans);
}