We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
window
1 parent 54f5b9e commit d874726Copy full SHA for d874726
packages/nuxt/src/pages/runtime/validate.ts
@@ -29,7 +29,9 @@ export default defineNuxtRouteMiddleware(async (to) => {
29
// We pretend to have navigated to the invalid route so
30
// that the user can return to the previous page with
31
// the back button.
32
- window?.history.pushState({}, '', to.fullPath)
+ if (typeof window !== 'undefined') {
33
+ window.history.pushState({}, '', to.fullPath)
34
+ }
35
})
36
// We stop the navigation immediately before it resolves
37
// if there is no other route matching it.
0 commit comments