Selaa lähdekoodia

feat(cientos): getting app from getCurrentInstance 🤩

Alvaro 2 vuotta sitten
vanhempi
commit
f899977f25
1 muutettua tiedostoa jossa 3 lisäystä ja 1 poistoa
  1. 3 1
      packages/cientos/src/core/useCientos.ts

+ 3 - 1
packages/cientos/src/core/useCientos.ts

@@ -1,7 +1,9 @@
 import { useCatalogue } from '@tresjs/core'
+import { getCurrentInstance } from 'vue'
 
 export function useCientos() {
-  const { catalogue, extend } = useCatalogue(window.__TRES__.app)
+  const { appContext } = getCurrentInstance()
+  const { catalogue, extend } = useCatalogue(appContext.app)
 
   return {
     catalogue,