Skip to content

Commit

Permalink
fix(logger): fix log is null
Browse files Browse the repository at this point in the history
  • Loading branch information
tarotlwei committed Aug 6, 2018
1 parent 3a0f390 commit cbd16ca
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions bin/tsw/util/logger/logger.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,13 +82,15 @@ Logger.prototype = {

clean: function() {
let log = this.getLog();
log.arr = null;
if (log.json) {
log.json.curr = null;
log.json.ajax = null;
log.json = null;
if (log) {
log.arr = null;
if (log.json) {
log.json.curr = null;
log.json.ajax = null;
log.json = null;
}
log = null;
}
log = null;
},

getJson: function(cleared) {
Expand Down

0 comments on commit cbd16ca

Please sign in to comment.