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 {
|
||||
endFilenameInd = htmlFile.indexOf('.js', ind + startTag.length + 3);
|
||||
filename = htmlFile.substring(ind + startTag.length, endFilenameInd);
|
||||
// the length of hijackConsoleErrorsScript is 35 lines, already needed a -1 offset.
|
||||
lineOffset = htmlFile.substring(0, ind).split('\n').length + 34;
|
||||
// the length of hijackConsoleErrorsScript is 31 lines
|
||||
lineOffset = htmlFile.substring(0, ind).split('\n').length + 31;
|
||||
offs.push([lineOffset, filename]);
|
||||
lastInd = ind + 1;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue