From 045014ba6f55eb04ba7da65ea2328e8d7aaa3802 Mon Sep 17 00:00:00 2001 From: Adam Warner Date: Sat, 16 Nov 2019 21:43:20 +0000 Subject: [PATCH] apply @mcat12's suggestion. I agree, it is cleaner to read! Signed-off-by: Adam Warner --- src/config.development.tsx | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/config.development.tsx b/src/config.development.tsx index 2bedaad..61b835e 100644 --- a/src/config.development.tsx +++ b/src/config.development.tsx @@ -10,13 +10,8 @@ import { Config } from "./config"; -let apiUrlBase; - -if (process.env.REACT_APP_CUSTOM_API_URL) { - apiUrlBase = process.env.REACT_APP_CUSTOM_API_URL; -} else { - apiUrlBase = process.env.PUBLIC_URL; -} +const apiUrlBase = + process.env.REACT_APP_CUSTOM_API_URL || process.env.PUBLIC_URL; export default { developmentMode: true,