Skip to content

Commit d36c0ae

Browse files
committed
🐛 Fix: writing log sometimes disappeared
1 parent c312302 commit d36c0ae

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/lib/Logger.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,9 @@ class Logger {
2626
let log = chalk[this.level[type]](`[PicGo ${type.toUpperCase()}]: `)
2727
log += msg
2828
console.log(log)
29-
this.handleWriteLog(type, msg, this.ctx)
29+
process.nextTick(() => {
30+
this.handleWriteLog(type, msg, this.ctx)
31+
})
3032
return msg
3133
} else {
3234
return

0 commit comments

Comments
 (0)