Skip to content

Commit

Permalink
Fixed some closure errors
Browse files Browse the repository at this point in the history
  • Loading branch information
niemyjski committed Aug 9, 2015
1 parent 4a97acc commit 498a299
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion spec/tracekit-parser-spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@
it('should parse empty IE 9 error', function() {
var stackFrames = TraceKit.computeStackTrace(CapturedExceptions.IE_9);
expect(stackFrames).toBeTruthy();
expect(stackFrames.stack.length).toBe(0);
stackFrames.stack && expect(stackFrames.stack.length).toBe(0);
});

it('should parse IE 10 error', function () {
Expand Down
8 changes: 4 additions & 4 deletions tracekit.js
Original file line number Diff line number Diff line change
Expand Up @@ -823,7 +823,7 @@ TraceKit.computeStackTrace = (function computeStackTraceWrapper() {
}

for (var line = 2; line < lines.length; line += 2) {
var item, source;
var item = null;
if ((parts = lineRE1.exec(lines[line]))) {
item = {
'url': parts[2],
Expand All @@ -843,7 +843,7 @@ TraceKit.computeStackTrace = (function computeStackTraceWrapper() {
var relativeLine = (+parts[1]); // relative to the start of the <SCRIPT> block
var script = inlineScriptBlocks[parts[2] - 1];
if (script) {
source = getSource(item.url);
var source = getSource(item.url);
if (source) {
source = source.join('\n');
var pos = source.indexOf(script.innerText);
Expand All @@ -855,12 +855,12 @@ TraceKit.computeStackTrace = (function computeStackTraceWrapper() {
} else if ((parts = lineRE3.exec(lines[line]))) {
var url = window.location.href.replace(/#.*$/, '');
var re = new RegExp(escapeCodeAsRegExpForMatchingInsideHTML(lines[line + 1]));
source = findSourceInUrls(re, [url]);
var src = findSourceInUrls(re, [url]);
item = {
'url': url,
'func': '',
'args': [],
'line': source ? source.line : parts[1],
'line': src ? src.line : parts[1],
'column': null
};
}
Expand Down

0 comments on commit 498a299

Please sign in to comment.