fix log.debug in IE
This commit is contained in:
parent
74541c6f7b
commit
ffe1b8e149
1 changed files with 8 additions and 1 deletions
|
|
@ -49,7 +49,14 @@ _.each(levels, function(level, levelName) {
|
|||
if (Error.stackTraceLimit && this.level == 'debug') {
|
||||
var old = Error.stackTraceLimit;
|
||||
Error.stackTraceLimit = 2
|
||||
var stack = new Error().stack;
|
||||
var stack;
|
||||
|
||||
// this hack is to be compatible with IE11
|
||||
try {
|
||||
anerror();
|
||||
} catch (e) {
|
||||
stack = e.stack;
|
||||
}
|
||||
var lines = stack.split('\n');
|
||||
var caller = lines[2];
|
||||
caller = ':' + caller.substr(6);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue