From 22a211f1de690af27989e1becadcdc78a2be0ed9 Mon Sep 17 00:00:00 2001 From: Fabien O'Carroll Date: Wed, 12 May 2021 14:27:30 +0100 Subject: [PATCH] Fixed `@price` data when Stripe is not configured no-issue Themes which use the `@price` data will have a 400 error if they are not setup prices. This adds default price data so that the theme will not error. --- core/frontend/services/theme-engine/middleware.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/core/frontend/services/theme-engine/middleware.js b/core/frontend/services/theme-engine/middleware.js index 0f0acd91c6..4fe90402b0 100644 --- a/core/frontend/services/theme-engine/middleware.js +++ b/core/frontend/services/theme-engine/middleware.js @@ -50,9 +50,9 @@ function ensureActiveTheme(req, res, next) { async function haxGetMembersPriceData() { const defaultPrice = { amount: 0, - currency: null, - interval: null, - nickname: null + currency: 'usd', + interval: 'year', + nickname: '' }; function makePriceObject(price) { @@ -103,7 +103,7 @@ async function haxGetMembersPriceData() { return { monthly: makePriceObject(defaultPrice), yearly: makePriceObject(defaultPrice), - currency: null + currency: 'usd' }; } }