Skip to content

Commit d7c6b63

Browse files
committed
ENV fix
1 parent 3a8795e commit d7c6b63

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/components/common/AppInit.tsx

+3-3
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,9 @@ const AppInitializer = ({ children }: { children: ReactNode }) => {
4343
// Effect to set credentials from environment variables
4444
useEffect(() => {
4545
// Check if credentials are set from environment variables
46-
const envUrl = window.env?.VITE_CLICKHOUSE_URL;
47-
const envUser = window.env?.VITE_CLICKHOUSE_USER;
48-
const envPass = window.env?.VITE_CLICKHOUSE_PASS;
46+
const envUrl = import.meta.env?.VITE_CLICKHOUSE_URL || window.env?.VITE_CLICKHOUSE_URL;
47+
const envUser = import.meta.env?.VITE_CLICKHOUSE_USER || window.env?.VITE_CLICKHOUSE_USER;
48+
const envPass = import.meta.env?.VITE_CLICKHOUSE_PASS || window.env?.VITE_CLICKHOUSE_PASS;
4949
const envUseAdvanced = window.env?.VITE_CLICKHOUSE_USE_ADVANCED;
5050
const envCustomPath = window.env?.VITE_CLICKHOUSE_CUSTOM_PATH;
5151

0 commit comments

Comments
 (0)