Browse Source

fix: rendering of placeholders

tophf 1 year ago
parent
commit
9b708484b0
1 changed files with 2 additions and 2 deletions
  1. 2 2
      src/common/ui/code.vue

+ 2 - 2
src/common/ui/code.vue

@@ -244,7 +244,7 @@ function createPlaceholders(change) {
   return res;
 }
 function renderPlaceholders() {
-  for (const p of placeholders) {
+  placeholders.forEach(p => {
     if (!p.el) {
       const { line, ch, body, length } = p;
       const el = document.createElement('span');
@@ -261,7 +261,7 @@ function renderPlaceholders() {
       };
       p.el = el;
     }
-  }
+  });
 }
 function initialize() {
   maxDisplayLength = cm.options.maxDisplayLength;