From f06307cb4cd4373d522287d469709088a45ba874 Mon Sep 17 00:00:00 2001 From: Richard Hansen Date: Sun, 15 Aug 2021 02:48:26 -0400 Subject: [PATCH] ace2_inner: Fix for..in iteration See commit c38c34bef47a74467394797b34165641a87ac620. --- src/static/js/ace2_inner.js | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/static/js/ace2_inner.js b/src/static/js/ace2_inner.js index 5f1885969..32946fbbf 100644 --- a/src/static/js/ace2_inner.js +++ b/src/static/js/ace2_inner.js @@ -2263,13 +2263,11 @@ function Ace2Inner(editorInfo, cssManagers) { detectChangesAroundLine(0, 1); detectChangesAroundLine(N - 1, 1); - for (const k in observedChanges.cleanNodesNearChanges) { - if (observedChanges.cleanNodesNearChanges[k]) { - const key = k.substring(1); - if (rep.lines.containsKey(key)) { - const line = rep.lines.indexOfKey(key); - detectChangesAroundLine(line, 2); - } + for (const k of Object.keys(observedChanges.cleanNodesNearChanges)) { + const key = k.substring(1); + if (rep.lines.containsKey(key)) { + const line = rep.lines.indexOfKey(key); + detectChangesAroundLine(line, 2); } } }