chore: document div wrapper in client-only page (#30359)

This commit is contained in:
Julien Huang 2024-12-24 12:55:45 +01:00 committed by Daniel Roe
parent c4ce09bc0b
commit 9a8e34d81a
No known key found for this signature in database
GPG Key ID: CBC814C393D93268

View File

@ -18,6 +18,8 @@ export const createClientPage = (loader: AsyncComponentLoader) => {
setup (_, { attrs }) {
const nuxtApp = useNuxtApp()
if (import.meta.server || nuxtApp.isHydrating) {
// wrapped with div to avoid Transition issues
// @see https://github.com/nuxt/nuxt/pull/25037#issuecomment-1877423894
return () => h('div', [
h(ClientOnly, undefined, {
default: () => h(page, attrs),