Skip to content

Commit

Permalink
fix(logger): defaultDebugMode
Browse files Browse the repository at this point in the history
  • Loading branch information
alimd committed Jan 8, 2024
1 parent 9799320 commit bab9f7c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/logger/src/logger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@ import type {AlwatrLogger} from './type.js';
definePackage('@alwatr/logger', __package_version__);

const defaultDebugMode =
platformInfo.development || platformInfo.isCli
platformInfo.development ||
(platformInfo.isCli
? process.env.DEBUG !== undefined && process.env.DEBUG !== ''
: typeof localStorage !== 'undefined' && localStorage.getItem('debug') === '1';
: typeof localStorage !== 'undefined' && localStorage.getItem('debug') === '1');

/**
* Color list storage for logger.
Expand Down

0 comments on commit bab9f7c

Please sign in to comment.