Browse Source

Update comment for clarity

Kevin Batdorf 4 years ago
parent
commit
e7847891df
3 changed files with 3 additions and 3 deletions
  1. 1 1
      dist/alpine-ie11.js
  2. 1 1
      dist/alpine.js
  3. 1 1
      src/directives/for.js

+ 1 - 1
dist/alpine-ie11.js

@@ -5997,7 +5997,7 @@
   }
 
   function lookAheadForMatchingKeyedElementAndMoveItIfFound(nextEl, currentKey) {
-    if (!nextEl) return; // If the next El isn't keyed, we can ignore it.
+    if (!nextEl) return; // If we are already past the x-for generated elements, we don't need to look ahead.
 
     if (nextEl.__x_for_key === undefined) return; // If the the key's DO match, no need to look ahead.
 

+ 1 - 1
dist/alpine.js

@@ -594,7 +594,7 @@
   }
 
   function lookAheadForMatchingKeyedElementAndMoveItIfFound(nextEl, currentKey) {
-    if (!nextEl) return; // If the next El isn't keyed, we can ignore it.
+    if (!nextEl) return; // If we are already past the x-for generated elements, we don't need to look ahead.
 
     if (nextEl.__x_for_key === undefined) return; // If the the key's DO match, no need to look ahead.
 

+ 1 - 1
src/directives/for.js

@@ -111,7 +111,7 @@ function addElementInLoopAfterCurrentEl(templateEl, currentEl) {
 function lookAheadForMatchingKeyedElementAndMoveItIfFound(nextEl, currentKey) {
     if (! nextEl) return
 
-    // If the next El isn't keyed, we can ignore it.
+    // If we are already past the x-for generated elements, we don't need to look ahead.
     if (nextEl.__x_for_key === undefined) return
 
     // If the the key's DO match, no need to look ahead.