From: Eduardo San Martin Morote Date: Wed, 17 May 2023 08:06:53 +0000 (+0200) Subject: refactor: hasInjectionContext X-Git-Tag: @pinia/nuxt@0.4.11~11 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=915e754d3669f2d532bcb92ece9e4ea7dcd23240;p=thirdparty%2Fvuejs%2Fpinia.git refactor: hasInjectionContext --- diff --git a/packages/pinia/src/rootStore.ts b/packages/pinia/src/rootStore.ts index 0eab00df..1ee39576 100644 --- a/packages/pinia/src/rootStore.ts +++ b/packages/pinia/src/rootStore.ts @@ -1,6 +1,11 @@ -import { App, EffectScope, inject, InjectionKey, Ref } from 'vue-demi' -// FIXME: move to vue-demi when available -import { hasInjectionContext } from 'vue' +import { + App, + EffectScope, + inject, + hasInjectionContext, + InjectionKey, + Ref, +} from 'vue-demi' import { StateTree, PiniaCustomProperties, diff --git a/packages/pinia/src/store.ts b/packages/pinia/src/store.ts index 57cc7b32..50b15444 100644 --- a/packages/pinia/src/store.ts +++ b/packages/pinia/src/store.ts @@ -2,6 +2,7 @@ import { watch, computed, inject, + hasInjectionContext, getCurrentInstance, reactive, DebuggerEvent, @@ -23,8 +24,6 @@ import { nextTick, isVue2, } from 'vue-demi' -// FIXME: move to vue-demi when available -import { hasInjectionContext } from 'vue' import { StateTree, SubscriptionCallback,