Skip to content

Commit

Permalink
fix: re-implement nuxt#7818
Browse files Browse the repository at this point in the history
  • Loading branch information
danielroe committed Oct 1, 2022
1 parent 28d99ee commit 25e22fe
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/nuxt/src/app/components/layout.ts
@@ -1,4 +1,4 @@
import { computed, defineComponent, h, isRef, nextTick, onMounted, Ref, Transition, VNode } from 'vue'
import { computed, defineComponent, h, nextTick, onMounted, Ref, Transition, unref, VNode } from 'vue'
import { _wrapIf } from './utils'
import { useRouter } from '#app'
// @ts-ignore
Expand Down Expand Up @@ -47,7 +47,7 @@ export default defineComponent({
// Use router.currentRoute.value instead because this must be changed synchronized with route
const router = useRouter()
const route = computed(() => router.currentRoute.value)
const layout = computed(() => (isRef(props.name) ? props.name.value : props.name) ?? route.value.meta.layout as string ?? 'default')
const layout = computed(() => unref(props.name) ?? route.value.meta.layout as string ?? 'default')

let vnode: VNode
let _layout: string | false
Expand Down

0 comments on commit 25e22fe

Please sign in to comment.