From 33746471a1d64608db7f93f046ae3b4b03ee4155 Mon Sep 17 00:00:00 2001 From: Andrei Poenaru Date: Mon, 14 Aug 2017 21:28:31 +0100 Subject: [PATCH] Fix environment variable not being interpreted as string. --- lib/components/App.js | 2 +- webpack.config.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/components/App.js b/lib/components/App.js index d82f230..aea3e20 100644 --- a/lib/components/App.js +++ b/lib/components/App.js @@ -94,7 +94,7 @@ export default class App extends React.Component {

- { process.env.DISABLE_GA != 'yes' && } + { process.env.DISABLE_GA != 'yes' ? :
} ); diff --git a/webpack.config.js b/webpack.config.js index 92ab598..2982761 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -30,7 +30,7 @@ module.exports = { plugins: [ new webpack.DefinePlugin({ 'process.env': { - 'DISABLE_GA': process.env.DISABLE_GA, + 'DISABLE_GA': JSON.stringify(process.env.DISABLE_GA), } }) ],