lint: Declare variables above their first use

This makes it possible to convert from `var` to `let` without getting
ReferenceErrors.
pull/4513/head
Richard Hansen 2020-11-23 23:01:38 -05:00 committed by John McLear
parent 8ea1a1b90a
commit 0625739cb8
1 changed files with 2 additions and 3 deletions

View File

@ -85,6 +85,8 @@ function Ace2Inner(){
iframe.ace_outerWin = null; // prevent IE 6 memory leak
var sideDiv = iframe.nextSibling;
var lineMetricsDiv = sideDiv.nextSibling;
var lineNumbersShown;
var sideDivInner;
initLineNumbers();
var scroll = Scroll.init(outerWin);
@ -4916,9 +4918,6 @@ function Ace2Inner(){
editorInfo.ace_doInsertUnorderedList = doInsertUnorderedList;
editorInfo.ace_doInsertOrderedList = doInsertOrderedList;
var lineNumbersShown;
var sideDivInner;
function initLineNumbers() {
lineNumbersShown = 1;
sideDiv.innerHTML = '<div id="sidedivinner" class="sidedivinner"><div><span class="line-number">1</span></div></div>';