diff --git a/packages/nuxt/src/app/composables/payload.ts b/packages/nuxt/src/app/composables/payload.ts index 9188ff3608..f3547d20be 100644 --- a/packages/nuxt/src/app/composables/payload.ts +++ b/packages/nuxt/src/app/composables/payload.ts @@ -1,4 +1,4 @@ -import { hasProtocol, joinURL } from 'ufo' +import { hasProtocol, joinURL, withoutTrailingSlash } from 'ufo' import { parse } from 'devalue' import { useHead } from '@unhead/vue' import { getCurrentInstance } from 'vue' @@ -79,6 +79,7 @@ async function _importPayload (payloadURL: string) { export async function isPrerendered (url = useRoute().path) { // Note: Alternative for server is checking x-nitro-prerender header if (!appManifest) { return !!useNuxtApp().payload.prerenderedAt } + url = withoutTrailingSlash(url) const manifest = await getAppManifest() if (manifest.prerendered.includes(url)) { return true