diff --git a/layouts/error.vue b/layouts/error.vue index 448d2fb01a..14539b59c5 100644 --- a/layouts/error.vue +++ b/layouts/error.vue @@ -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;