Merge pull request #1448 from SebasMag/short-js-names
Fixed a bug that appears on preview due to short file name
This commit is contained in:
commit
19cc0fabee
1 changed files with 1 additions and 1 deletions
|
@ -60,7 +60,7 @@ export const getAllScriptOffsets = (htmlFile) => {
|
||||||
if (ind === -1) {
|
if (ind === -1) {
|
||||||
foundJSScript = false;
|
foundJSScript = false;
|
||||||
} else {
|
} else {
|
||||||
endFilenameInd = htmlFile.indexOf('.js', ind + startTag.length + 3);
|
endFilenameInd = htmlFile.indexOf('.js', ind + startTag.length + 1);
|
||||||
filename = htmlFile.substring(ind + startTag.length, endFilenameInd);
|
filename = htmlFile.substring(ind + startTag.length, endFilenameInd);
|
||||||
lineOffset = htmlFile.substring(0, ind).split('\n').length + hijackConsoleErrorsScriptLength;
|
lineOffset = htmlFile.substring(0, ind).split('\n').length + hijackConsoleErrorsScriptLength;
|
||||||
offs.push([lineOffset, filename]);
|
offs.push([lineOffset, filename]);
|
||||||
|
|
Loading…
Reference in a new issue