Skip to content

fix(iife): add hasInjectionContext #225

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 1 commit into from
May 17, 2023

Conversation

posva
Copy link
Collaborator

@posva posva commented May 17, 2023

Fix #224

@@ -19,6 +19,7 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
VueDemi.Vue2 = Vue
VueDemi.version = Vue.version
VueDemi.warn = Vue.util.warn
VueDime.hasInjectionContext = () => !!VueDemi.getCurrentInstance()
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think there is a typo in your variable, repeated on the second line change

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! I created #227. In this kind of cases, it's even better if you can directly create the PR @noook 😄

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Vue 2.7: Error "VueCompositionAPI is not defined" in hasInjectionContext()
3 participants