diff --git a/src/shareon.js b/src/shareon.js index f8b06fa..4164053 100644 --- a/src/shareon.js +++ b/src/shareon.js @@ -38,14 +38,22 @@ const initializeShareon = () => { const shareonContainers = document.querySelectorAll(".shareon"); // iterate over
- for (let i = 0; i < shareonContainers.length; i += 1) { + for ( + let containerIndex = 0; + containerIndex < shareonContainers.length; + containerIndex += 1 + ) { /** @type Element */ - const container = shareonContainers[i]; + const container = shareonContainers[containerIndex]; // iterate over children of
- for (let j = 0; j < container.children.length; j += 1) { + for ( + let childIndex = 0; + childIndex < container.children.length; + childIndex += 1 + ) { /** @type Element */ - const child = container.children[j]; + const child = container.children[childIndex]; if (child) { const classListLength = child.classList.length;