Skip to content

Commit

Permalink
fix(url): add pathname
Browse files Browse the repository at this point in the history
close #1
  • Loading branch information
azu committed Jun 15, 2016
1 parent 7e56864 commit 9a67b2e
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,16 @@ export default class SideEffectLocationHash extends React.Component {
}

render() {
const location = AppLocator.history.getCurrentLocation();
if (this.props.text) {
AppLocator.history.push({
pathname: location.pathname,
search: `?text=${this.props.text}`,
});
} else {
// empt
AppLocator.history.push({
pathname: location.pathname,
search: null
});
}
Expand Down

0 comments on commit 9a67b2e

Please sign in to comment.