Skip to content

Commit

Permalink
adjust createLocation calls after #4714 (#4805)
Browse files Browse the repository at this point in the history
  • Loading branch information
pieh authored and KyleAMathews committed Apr 3, 2018
1 parent b319c84 commit 8ff0414
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/gatsby-link/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ class GatsbyLink extends React.Component {
}

const { history } = context.router
const to = createLocation(props.to, history)
const to = createLocation(props.to, null, null, history.location)

this.state = {
path: createPath(to),
Expand All @@ -67,7 +67,7 @@ class GatsbyLink extends React.Component {

componentWillReceiveProps(nextProps) {
if (this.props.to !== nextProps.to) {
const to = createLocation(nextProps.to, history)
const to = createLocation(nextProps.to, null, null, history.location)
this.setState({
path: createPath(to),
to,
Expand Down

0 comments on commit 8ff0414

Please sign in to comment.