Skip to content

Commit 0edaa5f

Browse files
author
Sebas Maagnaldii
committed
Fixed a bug that appears on preview when a .js file has a 2 or less name length
1 parent 11511a8 commit 0edaa5f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

client/utils/consoleUtils.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ export const getAllScriptOffsets = (htmlFile) => {
6060
if (ind === -1) {
6161
foundJSScript = false;
6262
} else {
63-
endFilenameInd = htmlFile.indexOf('.js', ind + startTag.length + 3);
63+
endFilenameInd = htmlFile.indexOf('.js', ind + startTag.length + 1);
6464
filename = htmlFile.substring(ind + startTag.length, endFilenameInd);
6565
lineOffset = htmlFile.substring(0, ind).split('\n').length + hijackConsoleErrorsScriptLength;
6666
offs.push([lineOffset, filename]);

0 commit comments

Comments
 (0)