Skip to content

Commit

Permalink
fix logger bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
yinxulai committed Apr 17, 2024
1 parent 254908d commit 44475bc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "airx",
"version": "0.2.2",
"version": "0.2.3",
"description": "a front framework with jsx",
"main": "./output/umd/index.js",
"module": "./output/esm/index.js",
Expand Down
4 changes: 3 additions & 1 deletion source/logger.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
const isDev = localStorage.getItem('airx-dev')
declare const process: { env?: { NODE_ENV?: string } } | undefined
const isDev = typeof process != 'undefined' && process?.env?.NODE_ENV === 'development'

export function createLogger(name: string) {
function getPrintPrefix() {
const date = new Date().toLocaleString()
Expand Down

0 comments on commit 44475bc

Please sign in to comment.