You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I wrote small dependency container plugin for Vue 2.7. i need use getCurrentInstance.
It works correctly if i import one from Vue directly.
But if i change import from 'vue-demi', i always get error 'Dependency container undefined. Check plugin setup'
import{getCurrentInstance}from'vue-demi'import{DescriptorsContainer}from'./plugin/descriptors-container'exportfunctiongetContainer(): DescriptorsContainer{constcurrentInstance=getCurrentInstance()?.proxy// it is defined and not null if i import getCurrentInstance from Vue directlyconstcontainer=currentInstance?.$vueModelerDcif(!container){// i alway here If getCurrentInstance imported from vue-demi thrownewError('Dependency container undefined. Check plugin setup')}returncontainer}
please, help me understand what is wrong
The text was updated successfully, but these errors were encountered:
I wrote small dependency container plugin for Vue 2.7. i need use getCurrentInstance.
It works correctly if i import one from Vue directly.
But if i change import from 'vue-demi', i always get error 'Dependency container undefined. Check plugin setup'
please, help me understand what is wrong
The text was updated successfully, but these errors were encountered: