From 54e638310cf68f32208de7f445ae6d1606a3bbb3 Mon Sep 17 00:00:00 2001 From: Rish Date: Thu, 15 Oct 2020 14:44:03 +0530 Subject: [PATCH] Added default support address for member site data no issue - In a case where support address is null, member's site data won't load as there was no fallback. - The fix adds default `noreply` as the support address for site data --- core/server/services/members/middleware.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/server/services/members/middleware.js b/core/server/services/members/middleware.js index da3860d64c..bebf9ef661 100644 --- a/core/server/services/members/middleware.js +++ b/core/server/services/members/middleware.js @@ -91,7 +91,7 @@ const getMemberSiteData = async function (req, res) { const isStripeConfigured = membersService.config.isStripeConnected(); const domain = urlUtils.urlFor('home', true).match(new RegExp('^https?://([^/:?#]+)(?:[/:?#]|$)', 'i')); const blogDomain = domain && domain[1]; - let supportAddress = settingsCache.get('members_support_address'); + let supportAddress = settingsCache.get('members_support_address') || 'noreply'; if (!supportAddress.includes('@')) { supportAddress = `${supportAddress}@${blogDomain}`; }