Skip to content

Commit

Permalink
fix(BaseLink): Return href='#' when onClick passed to BaseLink (befor…
Browse files Browse the repository at this point in the history
…e there wasn't an href at all c
LeonardoGentile committed Jun 16, 2017
1 parent 5c7ca75 commit 63ed19f
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -545,9 +545,9 @@ function logMeIn(e) {
function Menu(props) {
return (
<nav>
<Link routerStore={props.routerStore} routeName='home' routeOptions={{reload: true}}>Home</Link>
<Link router={props.router} routeName='home'>About</Link>
<Link onClick={logMeIn} >Login</Link>
<BaseLink routerStore={props.routerStore} routeName='home' routeOptions={{reload: true}}>Home</Link>
<BaseLink router={props.router} routeName='home'>About</Link>
<BaseLink onClick={logMeIn} >Login</Link>
</nav>
);
}
2 changes: 1 addition & 1 deletion src/modules/BaseLink.js
Original file line number Diff line number Diff line change
@@ -60,7 +60,7 @@ class BaseLink extends Component {
}
return this.router.buildPath(routeName, routeParams);
}
return null;
return '#';
}

clickHandler(evt) {

0 comments on commit 63ed19f

Please sign in to comment.