diff --git a/packages/nuxt/src/app/components/layout.ts b/packages/nuxt/src/app/components/layout.ts index 5c39fc19bc..bf6333d3d0 100644 --- a/packages/nuxt/src/app/components/layout.ts +++ b/packages/nuxt/src/app/components/layout.ts @@ -1,4 +1,4 @@ -import { defineComponent, isRef, nextTick, onMounted, Ref, Transition, VNode } from 'vue' +import { defineComponent, unref, nextTick, onMounted, Ref, Transition, VNode } from 'vue' import { _wrapIf } from './utils' import { useRoute } from '#app' // @ts-ignore @@ -29,7 +29,7 @@ export default defineComponent({ } return () => { - const layout = (isRef(props.name) ? props.name.value : props.name) ?? route.meta.layout as string ?? 'default' + const layout = unref(props.name) ?? route.meta.layout as string ?? 'default' const hasLayout = layout && layout in layouts if (process.dev && layout && !hasLayout && layout !== 'default') {