Skip to content

Commit

Permalink
var => const/let
Browse files Browse the repository at this point in the history
So that I can add a block scoped variable.
  • Loading branch information
gaearon committed Oct 9, 2017
1 parent 8770a9d commit 79b84d8
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/renderers/shared/shared/ReactTreeTraversal.js
Expand Up @@ -110,8 +110,8 @@ function traverseTwoPhase(inst, fn, arg) {
* "entered" or "left" that element.
*/
function traverseEnterLeave(from, to, fn, argFrom, argTo) {
var common = from && to ? getLowestCommonAncestor(from, to) : null;
var pathFrom = [];
const common = from && to ? getLowestCommonAncestor(from, to) : null;
const pathFrom = [];
while (true) {
if (!from) {
break;
Expand All @@ -122,7 +122,7 @@ function traverseEnterLeave(from, to, fn, argFrom, argTo) {
pathFrom.push(from);
from = getParent(from);
}
var pathTo = [];
const pathTo = [];
while (true) {
if (!to) {
break;
Expand All @@ -133,7 +133,7 @@ function traverseEnterLeave(from, to, fn, argFrom, argTo) {
pathTo.push(to);
to = getParent(to);
}
var i;
let i;
for (i = 0; i < pathFrom.length; i++) {
fn(pathFrom[i], 'bubbled', argFrom);
}
Expand Down

0 comments on commit 79b84d8

Please sign in to comment.