Explorar el Código

fix(cientos): fixed useCientos type issues

Alvaro hace 2 años
padre
commit
34aefc6f3f
Se han modificado 1 ficheros con 2 adiciones y 2 borrados
  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,