Skip to content

Commit

Permalink
fixes: Unknown props onInternalNav, tagType on <div> tag.
Browse files Browse the repository at this point in the history
  • Loading branch information
newtriks authored Sep 14, 2016
1 parent 07fcdf7 commit 3f0683c
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions react-internal-nav.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,17 @@ module.exports = React.createClass({

render: function () {
var props = {}
var tagType = this.props.tagType;

for (var key in this.props) {
props[key] = this.props[key]
}
props.onClick = this.onPotentialNav
return React.createElement(this.props.tagType, props, this.props.children)
props.onClick = this.onPotentialNav;
// Prevent unknown prop error:
// https://github.com/facebook/react/pull/6800
delete props.onInternalNav;
delete props.tagType;

return React.createElement(tagType, props, this.props.children)
}
})

0 comments on commit 3f0683c

Please sign in to comment.