Skip to content

Commit 8459755

Browse files
committed
[fixed] Include the hash prop on Links
1 parent 3b21c87 commit 8459755

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

modules/Link.js

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,14 @@ class Link extends Component {
8181

8282
event.preventDefault()
8383

84-
if (allowTransition)
85-
this.context.history.pushState(this.props.state, this.props.to, this.props.query)
84+
if (allowTransition) {
85+
let { state, to, query, hash } = this.props
86+
87+
if (hash)
88+
to += hash
89+
90+
this.context.history.pushState(state, to, query)
91+
}
8692
}
8793

8894
render() {

0 commit comments

Comments
 (0)