Skip to content

Commit 19cc0fa

Browse files
authored
Merge pull request #1448 from SebasMag/short-js-names
Fixed a bug that appears on preview due to short file name
2 parents d64d93c + 0edaa5f commit 19cc0fa

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)