Skip to content

Commit

Permalink
fix: handle process being undefined
Browse files Browse the repository at this point in the history
  • Loading branch information
gajus committed Oct 30, 2023
1 parent 6dd127e commit 83b46f9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/factories/createLogger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ export const createLogger = (
parentMessageContext: MessageContext = {},
transforms: ReadonlyArray<TransformMessageFunction<MessageContext>> = [],
): Logger => {
if (!isBrowser()) {
if (!isBrowser() && typeof process !== 'undefined') {
// eslint-disable-next-line node/no-process-env
const enabled = isTruthy(process.env.ROARR_LOG ?? '');

Expand Down

0 comments on commit 83b46f9

Please sign in to comment.