fix: prevent analytics on vercel environments

This commit is contained in:
Torsten Dittmann committed 2023-10-12 17:25:27 +02:00
1 parent e12068e1e2
commit 3cfac8154d
1 file changed
+1 -2
+1 -2
View File
@@ -9,7 +9,6 @@ export const VARS = {
| string
| undefined,
CONSOLE_MODE: import.meta.env?.VITE_CONSOLE_MODE?.toString() as string | undefined,
VERCEL_ENV: import.meta.env?.VITE_VERCEL_ENV?.toString() as string | undefined,
GOOGLE_ANALYTICS: import.meta.env?.VITE_GA_PROJECT?.toString() as string | undefined,
GOOGLE_TAG: import.meta.env?.VITE_GTM_PROJECT?.toString() as string | undefined
};
@@ -17,7 +16,7 @@ export const VARS = {
export const ENV = {
DEV: import.meta.env.DEV,
PROD: import.meta.env.PROD,
PREVIEW: VARS.VERCEL_ENV === 'preview',
PREVIEW: import.meta.env?.VERCEL === '1',
TEST: !!import.meta.env?.VITEST
};