From 53bd8a44ecea9882de9545c2d5e093479d7f5e50 Mon Sep 17 00:00:00 2001 From: Daniel Roe Date: Tue, 16 May 2023 22:50:55 +0100 Subject: [PATCH] fix(nuxt): allow island renders without `/` route (#20894) --- packages/nuxt/src/pages/runtime/plugins/router.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/nuxt/src/pages/runtime/plugins/router.ts b/packages/nuxt/src/pages/runtime/plugins/router.ts index 19bf8211f45f..65f6a96d1a7f 100644 --- a/packages/nuxt/src/pages/runtime/plugins/router.ts +++ b/packages/nuxt/src/pages/runtime/plugins/router.ts @@ -186,7 +186,7 @@ const plugin: Plugin<{ router: Router }> = defineNuxtPlugin({ if (process.server && failure?.type === 4 /* ErrorTypes.NAVIGATION_ABORTED */) { return } - if (to.matched.length === 0) { + if (to.matched.length === 0 && (!process.server || !nuxtApp.ssrContext?.islandContext)) { await nuxtApp.runWithContext(() => showError(createError({ statusCode: 404, fatal: false,