From c1366dd2f65773d715ceb0ab592f1aeb88d21b25 Mon Sep 17 00:00:00 2001 From: Emmanuel Demey Date: Tue, 27 Aug 2019 14:16:19 +0200 Subject: [PATCH] fix: solve unit test --- app/src/js/components/menu/referentiels/index.js | 3 +++ packages/bauhaus-library/.babelrc | 5 ++++- packages/bauhaus-library/package.json | 1 + yarn.lock | 8 ++++++++ 4 files changed, 16 insertions(+), 1 deletion(-) diff --git a/app/src/js/components/menu/referentiels/index.js b/app/src/js/components/menu/referentiels/index.js index ea1bbcb77..b332efcd1 100644 --- a/app/src/js/components/menu/referentiels/index.js +++ b/app/src/js/components/menu/referentiels/index.js @@ -20,6 +20,9 @@ function MenuReferentiels() { {process.env.REACT_APP_APPLICATIONS.split(',').map(appName => { const app = appName.trim(); + if (!app) { + return; + } return (
  • diff --git a/packages/bauhaus-library/.babelrc b/packages/bauhaus-library/.babelrc index bdb1d0ade..819e2ea87 100644 --- a/packages/bauhaus-library/.babelrc +++ b/packages/bauhaus-library/.babelrc @@ -1,4 +1,7 @@ { "presets": [["@babel/preset-env", {}]], - "plugins": ["@babel/plugin-transform-react-jsx"] + "plugins": [ + "@babel/plugin-proposal-class-properties", + "@babel/plugin-transform-react-jsx" + ] } diff --git a/packages/bauhaus-library/package.json b/packages/bauhaus-library/package.json index b90cab074..22518ac2c 100644 --- a/packages/bauhaus-library/package.json +++ b/packages/bauhaus-library/package.json @@ -18,6 +18,7 @@ }, "devDependencies": { "@babel/core": "^7.5.5", + "@babel/plugin-proposal-class-properties": "^7.5.5", "@babel/plugin-transform-react-jsx": "^7.3.0", "@babel/preset-env": "^7.5.5", "@storybook/addon-actions": "5.1.11", diff --git a/yarn.lock b/yarn.lock index 90d85ea95..edce1a7c2 100644 --- a/yarn.lock +++ b/yarn.lock @@ -310,6 +310,14 @@ "@babel/helper-create-class-features-plugin" "^7.5.5" "@babel/helper-plugin-utils" "^7.0.0" +"@babel/plugin-proposal-class-properties@^7.5.5": + version "7.5.5" + resolved "https://registry.npmjs.org/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.5.5.tgz#a974cfae1e37c3110e71f3c6a2e48b8e71958cd4" + integrity sha512-AF79FsnWFxjlaosgdi421vmYG6/jg79bVD0dpD44QdgobzHKuLZ6S3vl8la9qIeSwGi8i1fS0O1mfuDAAdo1/A== + dependencies: + "@babel/helper-create-class-features-plugin" "^7.5.5" + "@babel/helper-plugin-utils" "^7.0.0" + "@babel/plugin-proposal-decorators@7.4.0": version "7.4.0" resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-decorators/-/plugin-proposal-decorators-7.4.0.tgz#8e1bfd83efa54a5f662033afcc2b8e701f4bb3a9"