From 20d85d8949ed9160d409a29f3db181955ad593a0 Mon Sep 17 00:00:00 2001 From: Arpit Mohan Date: Mon, 21 Sep 2020 18:20:19 +0530 Subject: [PATCH] Giving higher preference to window variables instead of build variables in configuration. (#644) This is because window configurations have been set by the user while the build configurations have been set by the build script. --- app/client/src/configs/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/client/src/configs/index.ts b/app/client/src/configs/index.ts index 3a77498a8f..dd8f94dda8 100644 --- a/app/client/src/configs/index.ts +++ b/app/client/src/configs/index.ts @@ -103,8 +103,8 @@ const getConfigsFromEnvVars = (): INJECTED_CONFIGS => { }; const getConfig = (fromENV: string, fromWindow: string) => { - if (fromENV.length > 0) return { enabled: true, value: fromENV }; - else if (fromWindow.length > 0) return { enabled: true, value: fromWindow }; + if (fromWindow.length > 0) return { enabled: true, value: fromWindow }; + else if (fromENV.length > 0) return { enabled: true, value: fromENV }; return { enabled: false, value: "" }; };