Skip to content

Commit

Permalink
Use same i variable for all loops in diff (-12 B)
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewiggins committed Jun 14, 2019
1 parent 89380e5 commit 11ff728
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/diff/index.js
Expand Up @@ -291,7 +291,7 @@ export function diff(parentDom, newVNode, oldVNode, context, isSvg, excessDomChi
isSvg = newType==='svg' || isSvg;

if (parentDom==null && excessDomChildren!=null) {
for (let i=0; i<excessDomChildren.length; i++) {
for (i=0; i<excessDomChildren.length; i++) {
const child = excessDomChildren[i];
if (child!=null && (newType===null ? child.nodeType===3 : child.localName===newType)) {
parentDom = child;
Expand Down

0 comments on commit 11ff728

Please sign in to comment.