Browse Source

fix(cientos): fixed useCientos type issues

Alvaro 2 năm trước cách đây
mục cha
commit
34aefc6f3f
1 tập tin đã thay đổi với 2 bổ sung2 xóa
  1. 2 2
      packages/cientos/src/core/useCientos.ts

+ 2 - 2
packages/cientos/src/core/useCientos.ts

@@ -2,8 +2,8 @@ import { useCatalogue } from '@tresjs/core'
 import { getCurrentInstance } from 'vue'
 
 export function useCientos() {
-  const { appContext } = getCurrentInstance()
-  const { catalogue, extend } = useCatalogue(appContext.app)
+  const appContext = getCurrentInstance()?.appContext
+  const { catalogue, extend } = useCatalogue(appContext?.app)
 
   return {
     catalogue,