const options = this.$options
if (options.pinia) {
options.pinia.Vue = _Vue
- // this allows calling useStore() outside of a component setup after
- // installing pinia's plugin
- setActivePinia(options.pinia)
// HACK: taken from provide(): https://github.com/vuejs/composition-api/blob/master/src/apis/inject.ts#L25
/* istanbul ignore else */
if (!(this as any)._provided) {
state,
}
+ // this allows calling useStore() outside of a component setup after
+ // installing pinia's plugin
+ setActivePinia(pinia)
+
return pinia
}