kalk_web: Changed C-style for loop to for each loop

This commit is contained in:
bakk 2021-05-24 00:25:05 +02:00
parent eeb1e1e5a4
commit 36abfe60cc

View File

@ -221,8 +221,7 @@
const textNodes = getTextNodesIn(element);
let nodeEndPos = 0;
for (let i = 0; i < textNodes.length; i++) {
const textNode = textNodes[i];
for (const textNode of textNodes) {
const previousNodeEndPos = nodeEndPos;
nodeEndPos += textNode.length;