Skip to content
This repository has been archived by the owner on Apr 6, 2023. It is now read-only.

Commit

Permalink
chore(nuxt): replace isref to unref of layout.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
chenying333 committed Sep 26, 2022
1 parent 71ef8bd commit 5cb927d
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 { 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
Expand Down Expand Up @@ -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') {
Expand Down

0 comments on commit 5cb927d

Please sign in to comment.