-
Notifications
You must be signed in to change notification settings - Fork 7.5k
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
Broken top navigation links at 404 page #393
Comments
Looks related to #365. |
Yeah, sounds like the same thing I'm describing in this comment. Thanks for reporting. We'll try to dig into this soon. |
Unfortunately this can't be repro'd in dev mode because Gatsby handles 404s very different in dev vs prod. Shortest path to repro locally is The error is from trying to push to My current guess is that Gatsby isn't properly executing this code which sets |
Just as a proof-of-concept, I added a line to this short-circuit that sets a dummy if (!page) {
console.log(`A page wasn't found for "${path}"`)
window.___history = []; // TEST
return
} This prevents the undefined runtime error (but doesn't "fix" things since this isn't the react-router history object). |
It's interesting to note that this defect doesn't seem to impact the Gatsby site. Just to rule it out, I did a quick |
Sorry for not being able to jump on this :-( in a gazillion meetings today but I'll get on this tonight and look into why it could be undefined. |
No problem Kyle. I started digging into it before I realized that it wasn't happening on the Gatsby site, at which point I updated all of the Gatsby plugins and now it doesn't happen on the React site either. 😄 We could bisect to find out when it was fixed, if it's important to know. |
@ataylorme reported this on a site he's building where it's happening on every initial page load — with that I was able to dive into the issue and make this PR gatsbyjs/gatsby#3313 It's out in the latest gatsby release. |
🎉 Nice! |
Sync with reactjs.org @ c8aef5d
Errors in console
Tried in latest chrome and safari.
The text was updated successfully, but these errors were encountered: