fix line number for runtime errors
This commit is contained in:
parent
fa98306b9a
commit
e111d3c020
1 changed files with 2 additions and 2 deletions
|
@ -34,8 +34,8 @@ function getAllScriptOffsets(htmlFile) {
|
||||||
} else {
|
} else {
|
||||||
endFilenameInd = htmlFile.indexOf('.js', ind + startTag.length + 3);
|
endFilenameInd = htmlFile.indexOf('.js', ind + startTag.length + 3);
|
||||||
filename = htmlFile.substring(ind + startTag.length, endFilenameInd);
|
filename = htmlFile.substring(ind + startTag.length, endFilenameInd);
|
||||||
// the length of hijackConsoleErrorsScript is 35 lines, already needed a -1 offset.
|
// the length of hijackConsoleErrorsScript is 31 lines
|
||||||
lineOffset = htmlFile.substring(0, ind).split('\n').length + 34;
|
lineOffset = htmlFile.substring(0, ind).split('\n').length + 31;
|
||||||
offs.push([lineOffset, filename]);
|
offs.push([lineOffset, filename]);
|
||||||
lastInd = ind + 1;
|
lastInd = ind + 1;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue