mirror of https://github.com/rancher/dashboard.git
Fix SSR
This commit is contained in:
parent
f1468f7959
commit
6c5b09d0cb
|
|
@ -28,7 +28,9 @@ export default {
|
|||
// If the page isn't a sub-path of the base url, redirect to it instead of saying not found.
|
||||
// For clicking from manager -> explorer -> back, nuxt tries to load /g/clusters and doesn't
|
||||
// have a route for that.
|
||||
if (this.statusCode === 404 && !this.$route.path.startsWith(this.$router.options.base) && window._popStateDetected) {
|
||||
const wasBackNavigation = process.client ? window._popStateDetected : false;
|
||||
|
||||
if (this.statusCode === 404 && !this.$route.path.startsWith(this.$router.options.base) && wasBackNavigation) {
|
||||
window.location.href = this.$route.fullPath;
|
||||
|
||||
return;
|
||||
|
|
|
|||
Loading…
Reference in New Issue