Skip to content

Commit

Permalink
fix(iife): add hasInjectionContext (#225)
Browse files Browse the repository at this point in the history
  • Loading branch information
posva committed May 17, 2023
1 parent d3f1e6b commit 2c561a2
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/index.iife.js
Expand Up @@ -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()
function createApp(rootComponent, rootProps) {
var vm
var provide = {}
Expand Down Expand Up @@ -71,6 +72,7 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
VueDemi.Vue = Vue
VueDemi.Vue2 = Vue
VueDemi.version = Vue.version
VueDime.hasInjectionContext = () => !!VueDemi.getCurrentInstance()
} else {
console.error('[vue-demi] no VueCompositionAPI instance found, please be sure to import `@vue/composition-api` before `vue-demi`.')
}
Expand Down

0 comments on commit 2c561a2

Please sign in to comment.