From 0edaa5f55536209538a600dd7e2278d74a788ef7 Mon Sep 17 00:00:00 2001 From: Sebas Maagnaldii Date: Fri, 5 Jun 2020 02:51:58 -0300 Subject: [PATCH] Fixed a bug that appears on preview when a .js file has a 2 or less name length --- client/utils/consoleUtils.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/utils/consoleUtils.js b/client/utils/consoleUtils.js index 2f8ea1be..a6013924 100644 --- a/client/utils/consoleUtils.js +++ b/client/utils/consoleUtils.js @@ -60,7 +60,7 @@ export const getAllScriptOffsets = (htmlFile) => { if (ind === -1) { foundJSScript = false; } else { - endFilenameInd = htmlFile.indexOf('.js', ind + startTag.length + 3); + endFilenameInd = htmlFile.indexOf('.js', ind + startTag.length + 1); filename = htmlFile.substring(ind + startTag.length, endFilenameInd); lineOffset = htmlFile.substring(0, ind).split('\n').length + hijackConsoleErrorsScriptLength; offs.push([lineOffset, filename]);