Skip to content

Commit

Permalink
Move loop init variable assignment (#11182)
Browse files Browse the repository at this point in the history
  • Loading branch information
gaearon authored Oct 11, 2017
1 parent 4a26b90 commit b75be6a
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/renderers/shared/shared/ReactTreeTraversal.js
Original file line number Diff line number Diff line change
Expand Up @@ -141,11 +141,10 @@ function traverseEnterLeave(from, to, fn, argFrom, argTo) {
pathTo.push(to);
to = getParent(to);
}
let i;
for (i = 0; i < pathFrom.length; i++) {
for (let i = 0; i < pathFrom.length; i++) {
fn(pathFrom[i], 'bubbled', argFrom);
}
for (i = pathTo.length; i-- > 0; ) {
for (let i = pathTo.length; i-- > 0; ) {
fn(pathTo[i], 'captured', argTo);
}
}
Expand Down

0 comments on commit b75be6a

Please sign in to comment.