From 909fa4bb3e975b861a8f4b682098a624a1e1e33d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Rialland?= Date: Thu, 17 Mar 2022 15:48:47 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Fix=20storybook=20bug=20when=20b?= =?UTF-8?q?uild?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- site/source/utils.ts | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/site/source/utils.ts b/site/source/utils.ts index c4727e03e..d34605295 100644 --- a/site/source/utils.ts +++ b/site/source/utils.ts @@ -149,13 +149,18 @@ export const getBranch = () => { * or hide some features. * @returns boolean */ -export const isProduction = () => - import.meta.env.PROD && ['master', 'next'].includes(getBranch()) +export const isProduction = () => { + return import.meta.env.PROD && ['master', 'next'].includes(getBranch()) +} /** * Is a feature branche * @returns boolean */ -export const isStaging = () => import.meta.env.PROD && !isProduction() +export const isStaging = () => { + return import.meta.env.PROD && !isProduction() +} -export const isDevelopment = () => import.meta.env.DEV +export const isDevelopment = () => { + return import.meta.env.DEV +}