mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-11 08:33:53 +00:00
fix: only warn about error handlers on client-side (#3345)
This commit is contained in:
parent
ac63401700
commit
d007d02356
@ -103,7 +103,7 @@ export default defineNuxtPlugin<{ route: Route, router: Router }>((nuxtApp) => {
|
||||
|
||||
const route: Route = reactive(getRouteFromPath(process.client ? window.location.href : nuxtApp.ssrContext.url))
|
||||
async function handleNavigation (url: string, replace?: boolean): Promise<void> {
|
||||
if (process.dev && !hooks.error.length) {
|
||||
if (process.dev && process.client && !hooks.error.length) {
|
||||
console.warn('No error handlers registered to handle middleware errors. You can register an error handler with `router.onError()`')
|
||||
}
|
||||
try {
|
||||
|
Loading…
Reference in New Issue
Block a user