From 9fb6114c6c443eaaa292aaeca80e6e6c35e36614 Mon Sep 17 00:00:00 2001 From: Xavier Fournet <461943+xfournet@users.noreply.github.com> Date: Mon, 29 Jun 2026 16:37:12 +0200 Subject: [PATCH] fix: process is not defined in browser environment (#806) --- lib/utils/log.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/utils/log.ts b/lib/utils/log.ts index 9a187c70..9286b07b 100644 --- a/lib/utils/log.ts +++ b/lib/utils/log.ts @@ -1,4 +1,3 @@ /*eslint no-console:0*/ -export default function log(...args: unknown[]): void { - if (process.env.DRAGGABLE_DEBUG) console.log(...args); -} +const log = typeof process !== 'undefined' && process.env.DRAGGABLE_DEBUG ? console.log.bind(console) : function noop(): void {}; +export default log;