mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-28 05:14:12 +03:00
Added guards for stripe_plans
setting being null
no-issue There is concern that the settings cache can return `null` for values which it cannot parse correctly, this just ensures that we always have an array where we expect one
This commit is contained in:
parent
8675a7d317
commit
694d92d270
@ -62,7 +62,7 @@ class MembersConfigProvider {
|
||||
};
|
||||
|
||||
try {
|
||||
const plans = this._settingsCache.get('stripe_plans');
|
||||
const plans = this._settingsCache.get('stripe_plans') || [];
|
||||
|
||||
const priceData = plans.reduce((prices, plan) => {
|
||||
const numberAmount = 0 + plan.amount;
|
||||
@ -177,7 +177,7 @@ class MembersConfigProvider {
|
||||
product: {
|
||||
name: this._settingsCache.get('stripe_product_name')
|
||||
},
|
||||
plans: [COMPLIMENTARY_PLAN].concat(this._settingsCache.get('stripe_plans')),
|
||||
plans: [COMPLIMENTARY_PLAN].concat(this._settingsCache.get('stripe_plans') || []),
|
||||
appInfo: {
|
||||
name: 'Ghost',
|
||||
partner_id: 'pp_partner_DKmRVtTs4j9pwZ',
|
||||
|
Loading…
Reference in New Issue
Block a user