mirror of
https://github.com/langgenius/dify.git
synced 2026-10-29 18:07:39 +08:00
refactor: Replace direct process.env.NODE_ENV checks with IS_PROD and IS_DEV constants. (#30383)
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> Co-authored-by: Asuka Minato <i@asukaminato.eu.org>
This commit is contained in:
co-authored by
gemini-code-assist[bot]
Asuka Minato
parent
6ca44eea28
commit
69589807fd
@@ -23,6 +23,7 @@ import type {
|
||||
} from '@/models/common'
|
||||
import type { RETRIEVE_METHOD } from '@/types/app'
|
||||
import { useMutation, useQuery } from '@tanstack/react-query'
|
||||
import { IS_DEV } from '@/config'
|
||||
import { get, post } from './base'
|
||||
import { useInvalid } from './use-base'
|
||||
|
||||
@@ -85,7 +86,7 @@ export const useUserProfile = () => {
|
||||
profile,
|
||||
meta: {
|
||||
currentVersion: response.headers.get('x-version'),
|
||||
currentEnv: process.env.NODE_ENV === 'development'
|
||||
currentEnv: IS_DEV
|
||||
? 'DEVELOPMENT'
|
||||
: response.headers.get('x-env'),
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user