diff --git a/client/modules/IDE/components/PreviewFrame.jsx b/client/modules/IDE/components/PreviewFrame.jsx index c29d2e54..314090c7 100644 --- a/client/modules/IDE/components/PreviewFrame.jsx +++ b/client/modules/IDE/components/PreviewFrame.jsx @@ -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; }