From bca1e73a033f0ba950505087ad36baf0250f98e8 Mon Sep 17 00:00:00 2001 From: Tiberiu Ichim Date: Wed, 14 Jun 2023 10:25:39 +0300 Subject: [PATCH 1/2] Better env --- src/index.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/index.js b/src/index.js index f7a0d4a9..3375c7d3 100644 --- a/src/index.js +++ b/src/index.js @@ -23,15 +23,15 @@ import installSearchEngine from './search'; import GeocharsWidget from './components/theme/Widgets/GeocharsWidget'; import GeolocationWidget from './components/theme/Widgets/GeolocationWidget'; +const getEnv = () => (typeof window !== 'undefined' ? window.env : process.env); + const applyConfig = (config) => { const notInEnMission = /^(?!(\/en\/mission)).*$/; - if ( - !( - __DEVELOPMENT__ || - (process.env.RAZZLE_DISABLE_EXTERNAL_ROUTES && - process.env.RAZZLE_DISABLE_EXTERNAL_ROUTES === 'True') - ) - ) { + const env = getEnv(); + const isStaging = !!env.RAZZLE_IS_STAGING; + const enableMissionIsExternal = !isStaging && !__DEVELOPMENT__; + + if (enableMissionIsExternal) { config.settings.externalRoutes = [ ...(config.settings.externalRoutes || []), { From 28ac819131eaba4b62902ee24436905f778369fb Mon Sep 17 00:00:00 2001 From: EEA Jenkins <@users.noreply.github.com> Date: Wed, 14 Jun 2023 07:37:19 +0000 Subject: [PATCH 2/2] Automated release 0.1.27 --- CHANGELOG.md | 5 +++++ package.json | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 307b6e88..335ab52e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file. Dates are d Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog). +### [0.1.27](https://github.com/eea/volto-cca-policy/compare/0.1.26...0.1.27) - 14 June 2023 + +#### :hammer_and_wrench: Others + +- Better env [Tiberiu Ichim - [`bca1e73`](https://github.com/eea/volto-cca-policy/commit/bca1e73a033f0ba950505087ad36baf0250f98e8)] ### [0.1.26](https://github.com/eea/volto-cca-policy/compare/0.1.25...0.1.26) - 13 June 2023 #### :hammer_and_wrench: Others diff --git a/package.json b/package.json index 5edfd444..14d1e44f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@eeacms/volto-cca-policy", - "version": "0.1.26", + "version": "0.1.27", "description": "@eeacms/volto-cca-policy: Volto add-on", "main": "src/index.js", "author": "European Environment Agency: IDM2 A-Team",