Fox bug related to boolean parsing in the client .env

This commit is contained in:
pedrocx486 2025-01-31 01:32:26 -03:00
parent df1a19209c
commit 0a62f2a0f3
2 changed files with 4 additions and 4 deletions

View file

@ -1,4 +1,4 @@
# If the client is being served by the server itself, set to TRUE.
# If you're running locally in dev mode, set to FALSE and update the SERVER variable to point to the server URL.
VITE_STATIC='true'
# If the client is being served by the server itself, set to 1 (ONE).
# If you're running locally in dev mode, set to 0 (ZERO) and update the SERVER variable to point to the server URL.
VITE_STATIC='1'
VITE_SERVER='http://localhost:3000'

View file

@ -1,5 +1,5 @@
export const useGetServer = (): string => {
if (Boolean(import.meta.env.VITE_STATIC)) {
if (Number(import.meta.env.VITE_STATIC)) {
return window.location.origin;
} else {
return import.meta.env.VITE_SERVER;