Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Without breaking backwards compatibility
  • Loading branch information
soska committed Sep 10, 2013
1 parent 9139eb3 commit 908e5d2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions console-trace.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

/**
* Module dependencies.
*/
Expand Down Expand Up @@ -40,7 +39,8 @@ module.exports = function (options) {
arguments[0] = JSON.stringify(arguments[0], null, ' ');
}
var pad = (arguments[0] && !console.traceOptions.right || !isatty ? ' ' : '');
arguments[0] = console.traceFormat(__stack[1], name) + pad + arguments[0];
var stack = (typeof __stack !== 'undefined') ? __stack : callsite();
arguments[0] = console.traceFormat(stack[1], name) + pad + arguments[0];
}
console._trace = false;
return fn.apply(this, arguments);
Expand Down

0 comments on commit 908e5d2

Please sign in to comment.