bugfix-retry: only try to go to a line if the line actually exists
parent
73a8d593bb
commit
6ec89ecb90
|
@ -173,7 +173,7 @@ const loadBroadcastJS = (socket, sendSocketMsg, fireWhenAllScriptsAreLoaded, Bro
|
||||||
const goToLineNumber = (lineNumber) => {
|
const goToLineNumber = (lineNumber) => {
|
||||||
// Sets the Y scrolling of the browser to go to this line
|
// Sets the Y scrolling of the browser to go to this line
|
||||||
const line = $('#innerdocbody').find(`div:nth-child(${lineNumber + 1})`);
|
const line = $('#innerdocbody').find(`div:nth-child(${lineNumber + 1})`);
|
||||||
if (line) {
|
if (line && $(line)[0]) {
|
||||||
const newY = $(line)[0].offsetTop;
|
const newY = $(line)[0].offsetTop;
|
||||||
const ecb = document.getElementById('editorcontainerbox');
|
const ecb = document.getElementById('editorcontainerbox');
|
||||||
// Chrome 55 - 59 bugfix
|
// Chrome 55 - 59 bugfix
|
||||||
|
|
Loading…
Reference in New Issue