Skip to content

Commit

Permalink
Merge pull request #946 from hbucius/master
Browse files Browse the repository at this point in the history
	fix no onclick bug on Link Component
  • Loading branch information
roblg authored Aug 28, 2017
2 parents 0f7708b + 01aa1f9 commit a061e82
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/react-server/core/components/Link.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ module.exports = React.createClass({
propTypes: {
path : React.PropTypes.string,
href : React.PropTypes.string,
onClick : React.PropTypes.func,
bundleData : React.PropTypes.bool,
reuseDom : React.PropTypes.bool,
className : React.PropTypes.string,
Expand Down Expand Up @@ -39,6 +40,9 @@ module.exports = React.createClass({
bundleData,
reuseDom,
});
if (this.props.onClick) {
this.props.onClick(e);
}
} else {
// do normal browser navigate
}
Expand Down

0 comments on commit a061e82

Please sign in to comment.