Skip to content
This repository has been archived by the owner on Jul 15, 2019. It is now read-only.

Commit

Permalink
Merge pull request #17 from jedireza/navlink-children
Browse files Browse the repository at this point in the history
no longer processing children of a navlink
  • Loading branch information
jedireza committed May 8, 2015
2 parents 23f7170 + 5fee20b commit 4034635
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions lib/NavLink.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,16 +96,6 @@ var NavLink = React.createClass({
render: function() {
var href = this._getHrefFromProps(this.props);
var isActive = this.props.isActive(href);
var children = null;
if (this.props.children) {
if ('string' === typeof this.props.children) {
children = this.props.children;
} else {
children = React.Children.map(this.props.children, function (child) {
return React.cloneElement(child, {isActive: isActive});
});
}
}

var className = this.props.className;
var style = this.props.style;
Expand All @@ -124,7 +114,7 @@ var NavLink = React.createClass({
className: className,
style: style
}),
children
this.props.children
);
}
});
Expand Down

0 comments on commit 4034635

Please sign in to comment.