From ca84b79e369e300453337b4ce0ad621f0bd0ba16 Mon Sep 17 00:00:00 2001 From: BlankParticle Date: Mon, 22 Jul 2024 16:44:27 +0530 Subject: [PATCH] hotfix: Web app variables issue --- apps/web/src/env.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/apps/web/src/env.js b/apps/web/src/env.js index de49f197..4a40737d 100644 --- a/apps/web/src/env.js +++ b/apps/web/src/env.js @@ -1,5 +1,5 @@ -import { z } from 'zod'; import { createEnv } from '@t3-oss/env-core'; +import { z } from 'zod'; const IS_BROWSER = typeof window !== 'undefined'; const IS_DEV = process.env.NODE_ENV === 'development'; @@ -26,7 +26,9 @@ if (!IS_BROWSER) { PUBLIC_ENV_LIST.forEach((key) => { const prefixedKey = `NEXT_PUBLIC_${key}`; - process.env[prefixedKey] = process.env[key]; + if (typeof process.env[key] !== 'undefined') { + process.env[prefixedKey] = process.env[key]; + } }); }