Skip to content

Commit

Permalink
fix no onclick bug on Link Component
Browse files Browse the repository at this point in the history
  • Loading branch information
hbucius authored and weilong.cui committed Aug 22, 2017
1 parent 0f7708b commit 01aa1f9
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 01aa1f9

Please sign in to comment.