mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-20 22:42:53 -05:00
Filtered empty prices from list
no refs Handles empty price objects in the API and ignores them from UI
This commit is contained in:
parent
928122a8f7
commit
c1df8366fb
1 changed files with 6 additions and 2 deletions
|
@ -173,7 +173,9 @@ export function getAvailablePrices({site = {}, includeFree = true} = {}) {
|
|||
|
||||
const plansData = [];
|
||||
|
||||
const stripePrices = prices.map((d) => {
|
||||
const stripePrices = prices.filter((d) => {
|
||||
return !!(d && d.id);
|
||||
}).map((d) => {
|
||||
return {
|
||||
...d,
|
||||
price_id: d.id,
|
||||
|
@ -218,7 +220,9 @@ export function getSitePrices({site = {}, includeFree = true, pageQuery = ''} =
|
|||
|
||||
const plansData = [];
|
||||
|
||||
const stripePrices = prices.map((d) => {
|
||||
const stripePrices = prices.filter((d) => {
|
||||
return !!(d && d.id);
|
||||
}).map((d) => {
|
||||
return {
|
||||
...d,
|
||||
price_id: d.id,
|
||||
|
|
Loading…
Add table
Reference in a new issue