diff --git a/lib/v2.7/index.cjs b/lib/v2.7/index.cjs index 9813c17..1dce010 100644 --- a/lib/v2.7/index.cjs +++ b/lib/v2.7/index.cjs @@ -55,4 +55,4 @@ Object.keys(VueModule).forEach(function (key) { }) // Not implemented https://github.com/vuejs/core/pull/8111, falls back to getCurrentInstance() -exports.hasInjectionContext = () => !!VueCompositionAPI.getCurrentInstance() +exports.hasInjectionContext = () => !!VueModule.getCurrentInstance() diff --git a/lib/v2.7/index.mjs b/lib/v2.7/index.mjs index 80eb810..e575059 100644 --- a/lib/v2.7/index.mjs +++ b/lib/v2.7/index.mjs @@ -1,4 +1,5 @@ import Vue from 'vue' +import { getCurrentInstance } from 'vue' var isVue2 = true var isVue3 = false @@ -75,5 +76,5 @@ export * from 'vue' // Not implemented https://github.com/vuejs/core/pull/8111, falls back to getCurrentInstance() export function hasInjectionContext() { - return !!VueCompositionAPI.getCurrentInstance() + return !!getCurrentInstance() }