From 85e70491e413aca8fc8599e88f2e09ea5dde281d Mon Sep 17 00:00:00 2001 From: eight Date: Sun, 14 Oct 2018 17:36:00 +0800 Subject: [PATCH] Fix: unused renderIndex --- edit/sections-editor.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/edit/sections-editor.js b/edit/sections-editor.js index cb9926ad..2fb69ada 100644 --- a/edit/sections-editor.js +++ b/edit/sections-editor.js @@ -447,7 +447,6 @@ function createSectionsEditor(style) { focusOn = 0, done }) { - let renderIndex = sections.length; container.classList.add('hidden'); chunk(); @@ -458,8 +457,8 @@ function createSectionsEditor(style) { sections[focusOn].cm.focus(); } container.classList.remove('hidden'); - for (; renderIndex < sections.length; renderIndex++) { - sections[renderIndex].cm.refreshOnView(); + for (const section of sections) { + section.cm.refreshOnView(); } if (done) { done();