-
Notifications
You must be signed in to change notification settings - Fork 10.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[v2] adjust createLocation calls after #4714 #4805
Conversation
The change was intentional, but untested. The idea was that the prefix is set on the router, so the Link component doesn't need to do anything, since the router should automatically add the prefix. |
packages/gatsby-link/src/index.js
Outdated
@@ -17,6 +17,12 @@ function normalizePath(path) { | |||
return path.replace(/^\/\//g, `/`) | |||
} | |||
|
|||
function createLocation(path, history) { | |||
var location = cL(path, null, null, history.location) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the problem was i just assuming we were calling these two functions with the same arguments. but it looks like the RR createLocation has a different signature.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah, it seems that this local createLocation
signature is different than one imported from history
, I will update this PR and instead of reverting your changes will adjust params in createLocation
calls
fb24f19
to
cd76ee7
Compare
updated this PR |
Thanks for looking into this @pieh! |
* v2: Docgen improvements (gatsbyjs#4757) adjust createLocation calls after gatsbyjs#4714 (gatsbyjs#4805) Update breaking changes doc use basename for router instead of prefixing in link (gatsbyjs#4714) Fix inlined styles with path-prefixing (gatsbyjs#4717) Publish Upgrade & format [v2][wip] Upgrade Gatsby v2 to webpack 4 (gatsbyjs#4588) fix some jsdoc parsing bits (gatsbyjs#4675) [v2] fix wrong merge Publish Migrate to React Hot Loader v4 (gatsbyjs#4500) [v2] Fix deleteNodes deprecation (gatsbyjs#4453) Publish Switch to latest version of sharp to prevent yarn/npm errors (gatsbyjs#4417) # Conflicts: # packages/gatsby/package.json # packages/gatsby/src/utils/webpack-utils.js # yarn.lock
gatsby-link
changes in #4714 broke this component for me, reverting them fixes it@jquense was those changes intentional? I can look more in depth into it, just let me know