diff --git a/ghost/portal/src/utils/helpers.js b/ghost/portal/src/utils/helpers.js index cdfeb00a77..be0753d9d3 100644 --- a/ghost/portal/src/utils/helpers.js +++ b/ghost/portal/src/utils/helpers.js @@ -179,12 +179,14 @@ export function getAvailableProducts({site}) { } return products.filter(product => !!product).filter((product) => { + return !!(product.monthlyPrice && product.yearlyPrice); + }).filter((product) => { if (portalProducts) { return portalProducts.includes(product.id); } return true; }).sort((productA, productB) => { - return productA?.monthlyPrice?.amount - productB?.monthlyPrice.amount; + return productA?.monthlyPrice?.amount - productB?.monthlyPrice?.amount; }).map((product) => { product.monthlyPrice = { ...product.monthlyPrice,