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:
parent
d706d9f19b
commit
4e6051a5bd
1 changed files with 2 additions and 2 deletions
|
@ -314,12 +314,12 @@ export default class MembersAccessController extends Controller {
|
||||||
const currentYearlyPriceId = this.settings.get('membersYearlyPriceId');
|
const currentYearlyPriceId = this.settings.get('membersYearlyPriceId');
|
||||||
if (portalPlans.includes(currentMontlyPriceId)) {
|
if (portalPlans.includes(currentMontlyPriceId)) {
|
||||||
portalPlans = portalPlans.filter(priceId => priceId !== currentMontlyPriceId);
|
portalPlans = portalPlans.filter(priceId => priceId !== currentMontlyPriceId);
|
||||||
portalPlans.push(monthlyPriceId);
|
portalPlans.pushObject(monthlyPriceId);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (portalPlans.includes(currentYearlyPriceId)) {
|
if (portalPlans.includes(currentYearlyPriceId)) {
|
||||||
portalPlans = portalPlans.filter(priceId => priceId !== currentYearlyPriceId);
|
portalPlans = portalPlans.filter(priceId => priceId !== currentYearlyPriceId);
|
||||||
portalPlans.push(yearlyPriceId);
|
portalPlans.pushObject(yearlyPriceId);
|
||||||
}
|
}
|
||||||
this.settings.set('portalPlans', portalPlans);
|
this.settings.set('portalPlans', portalPlans);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue