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); + } }