From e130d5b5c4591644aebb8ca371e274c5758ea76c Mon Sep 17 00:00:00 2001 From: Kanhaiya Arora Date: Tue, 28 Jul 2026 05:00:11 +0530 Subject: [PATCH] fix: prevent process env error in browser builds --- lib/utils/log.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/utils/log.ts b/lib/utils/log.ts index 9a187c70..deec5c47 100644 --- a/lib/utils/log.ts +++ b/lib/utils/log.ts @@ -1,4 +1,6 @@ /*eslint no-console:0*/ export default function log(...args: unknown[]): void { - if (process.env.DRAGGABLE_DEBUG) console.log(...args); + if (typeof process !== "undefined" && process.env?.DRAGGABLE_DEBUG) { + console.log(...args); + } }