Skip to content

Commit

Permalink
fix(dice-admin):修正VITE_GLOB_APP_TITLE' of 'C' as it is undefined 错误
Browse files Browse the repository at this point in the history
  • Loading branch information
bihell committed Aug 7, 2023
1 parent 0cbcd80 commit ff0eacc
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion dice-admin/src/utils/env.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@ export function getAppEnvConfig() {
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]
? window[ENV_NAME as any]
: (import.meta.env as unknown as GlobEnvConfig)) as unknown as GlobEnvConfig;

const { VITE_GLOB_APP_TITLE, VITE_GLOB_API_URL, VITE_GLOB_API_URL_PREFIX, VITE_GLOB_UPLOAD_URL } =
ENV;
Expand Down

0 comments on commit ff0eacc

Please sign in to comment.