0
Fork 0
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:
Rishabh 2021-06-09 09:21:52 +05:30
parent 928122a8f7
commit c1df8366fb

View file

@ -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,