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

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', [