Skip to content

Commit fb6972e

Browse files
committed
Catering for evals in some anonymous functions. eg "eval at buildTmplFn (http://localhost:4000/javascripts/jquery/jquery.tmpl.js:317:10)"
1 parent 1d18129 commit fb6972e

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

stacktrace.js

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -346,11 +346,13 @@ printStackTrace.implementation.prototype = {
346346
frame = stack[i], ref = reStack.exec(frame);
347347

348348
if (ref) {
349-
var m = reRef.exec(ref[1]), file = m[1],
350-
lineno = m[2], charno = m[3] || 0;
351-
if (file && this.isSameDomain(file) && lineno) {
352-
var functionName = this.guessAnonymousFunction(file, lineno, charno);
353-
stack[i] = frame.replace('{anonymous}', functionName);
349+
var m = reRef.exec(ref[1]);
350+
if (m){
351+
var file = m[1], lineno = m[2], charno = m[3] || 0;
352+
if (file && this.isSameDomain(file) && lineno) {
353+
var functionName = this.guessAnonymousFunction(file, lineno, charno);
354+
stack[i] = frame.replace('{anonymous}', functionName);
355+
}
354356
}
355357
}
356358
}

0 commit comments

Comments
 (0)