Skip to content

Commit

Permalink
Preps 2.1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
ctrlplusb committed Apr 6, 2017
1 parent ea80323 commit 9fcb690
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions commonjs/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,15 +86,15 @@ function reactTreeWalker(element, visitor, context) {
// If its a react Children collection we need to breadth-first
// traverse each of them.
var mapper = function mapper(aChild) {
return aChild ? reactTreeWalker(aChild, visitor, theChildContext) : undefined;
return aChild ? reactTreeWalker(aChild, visitor, theChildContext, options) : undefined;
};
// pMapSeries allows us to do depth-first traversal. Thanks @sindresorhus!
pMapSeries(_react.Children.map(child, function (cur) {
return cur;
}), mapper).then(resolve);
} else {
// Otherwise we pass the individual child to the next recursion.
reactTreeWalker(child, visitor, theChildContext).then(resolve);
reactTreeWalker(child, visitor, theChildContext, options).then(resolve);
}
};

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-tree-walker",
"version": "2.1.0",
"version": "2.1.1",
"description": "Walk a React element tree, executing a provided function against each node.",
"license": "MIT",
"main": "commonjs/index.js",
Expand Down
4 changes: 2 additions & 2 deletions umd/react-tree-walker.js
Original file line number Diff line number Diff line change
Expand Up @@ -175,15 +175,15 @@ function reactTreeWalker(element, visitor, context) {
// If its a react Children collection we need to breadth-first
// traverse each of them.
var mapper = function mapper(aChild) {
return aChild ? reactTreeWalker(aChild, visitor, theChildContext) : undefined;
return aChild ? reactTreeWalker(aChild, visitor, theChildContext, options) : undefined;
};
// pMapSeries allows us to do depth-first traversal. Thanks @sindresorhus!
pMapSeries(_react.Children.map(child, function (cur) {
return cur;
}), mapper).then(resolve);
} else {
// Otherwise we pass the individual child to the next recursion.
reactTreeWalker(child, visitor, theChildContext).then(resolve);
reactTreeWalker(child, visitor, theChildContext, options).then(resolve);
}
};

Expand Down
2 changes: 1 addition & 1 deletion umd/react-tree-walker.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 9fcb690

Please sign in to comment.