From 456a0cff64b5594fb4265391cea6c04e99c884de Mon Sep 17 00:00:00 2001 From: Veera Marni Date: Fri, 4 Nov 2022 13:41:06 -0400 Subject: [PATCH 1/2] version --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 1fb2f1fd2..4a6d8779d 100755 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "sample-stack", - "version": "0.11.1", + "version": "0.11.2", "private": true, "homepage": "https://github.com/cdmbase/fullstack-pro#readme", "bugs": { From f46bae02a7b3df2ab6d0bfe862ffdf7c1a6000dc Mon Sep 17 00:00:00 2001 From: Veera Marni Date: Sun, 6 Nov 2022 19:29:57 -0500 Subject: [PATCH 2/2] add fix #285 --- .../frontend-server/src/config/public-config.ts | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/servers/frontend-server/src/config/public-config.ts b/servers/frontend-server/src/config/public-config.ts index 850928516..3282d3b27 100755 --- a/servers/frontend-server/src/config/public-config.ts +++ b/servers/frontend-server/src/config/public-config.ts @@ -6,20 +6,14 @@ import { lowerCase } from 'lodash'; * This file opens up in public site, so make sure it is * not dependent on any other file that compromises the security. */ -const publicEnv = [ - 'NODE_ENV', - 'GRAPHQL_URL', - 'FACEBOOK_APP_ID', - 'GA_ID', - 'LOG_LEVEL', -]; +const publicEnv = ['NODE_ENV', 'GRAPHQL_URL', 'FACEBOOK_APP_ID', 'GA_ID', 'LOG_LEVEL']; const isBrowser = typeof window !== 'undefined'; if (!isBrowser) { process.env.ENV_FILE !== null && require('dotenv').config({ path: process.env.ENV_FILE }); } -const base = (isBrowser ? ( window.__ENV__ || __ENV__) : process.env) || {}; +const base = (isBrowser ? window.__ENV__ || (typeof __ENV__ !== 'undefined' && __ENV__) : process.env) || {}; const env: any = {}; for (const v of publicEnv) { env[v] = base[v]; @@ -37,8 +31,9 @@ try { logger.info('Process Update Success!'); } catch (e) { logger.warn(e); - logger.info('Encountered above issue while running "global.process = process", will automatically try again in next render'); - + logger.info( + 'Encountered above issue while running "global.process = process", will automatically try again in next render', + ); } export const PUBLIC_SETTINGS: __PUBLIC_SETTINGS__ = { apolloLogging: false,