Skip to content

Commit

Permalink
fix(nuxt): only check if server page is prerendered on client (#26081)
Browse files Browse the repository at this point in the history
  • Loading branch information
danielroe committed Mar 5, 2024
1 parent 8398bcb commit 2e8c598
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/nuxt/src/components/runtime/server-component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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', [
Expand Down

0 comments on commit 2e8c598

Please sign in to comment.