fix(nuxt): only check if server page is prerendered on client (#26081)

This commit is contained in:
Daniel Roe 2024-03-05 10:36:05 +00:00 committed by GitHub
parent 8398bcb611
commit 2e8c598e4d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -42,7 +42,7 @@ export const createIslandPage = (name: string) => {
})
const route = useRoute()
const path = !import.meta.dev && await isPrerendered(route.path) ? route.path : route.fullPath.replace(/#.*$/, '')
const path = import.meta.client && await isPrerendered(route.path) ? route.path : route.fullPath.replace(/#.*$/, '')
return () => {
return h('div', [