From 833b31129befaae8dd363a3e1c9688f4eb6edc50 Mon Sep 17 00:00:00 2001 From: jinmao88 <50581550+jinmao88@users.noreply.github.com> Date: Thu, 10 Aug 2023 09:11:56 +0800 Subject: [PATCH] fix: getAppEnvConfig --- src/utils/env.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/utils/env.ts b/src/utils/env.ts index ef0433cf5..3e8c2dd4d 100644 --- a/src/utils/env.ts +++ b/src/utils/env.ts @@ -27,10 +27,10 @@ export function getStorageShortName() { export function getAppEnvConfig() { const ENV_NAME = getVariableName(import.meta.env.VITE_GLOB_APP_TITLE); - const ENV = (import.meta.env.DEV + const ENV = import.meta.env.DEV ? // Get the global configuration (the configuration will be extracted independently when packaging) (import.meta.env as unknown as GlobEnvConfig) - : window[ENV_NAME as any]) as unknown as GlobEnvConfig; + : (window[ENV_NAME as any] as unknown as GlobEnvConfig); const { VITE_GLOB_APP_TITLE, VITE_GLOB_API_URL, VITE_GLOB_API_URL_PREFIX, VITE_GLOB_UPLOAD_URL } = ENV;