Skip to content

Commit cb0ab57

Browse files
marcel-engelkeMarcel Engelke
andauthored
fix: Root instance not found when using with Vue 2.7 (#1379)
* fix: instance root not found * refactor: const * style: redundant space Co-authored-by: Marcel Engelke <marcel.engelke@frederix-hotspot.de>
1 parent 757e45c commit cb0ab57

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/vue-apollo-composable/src/util/loadingTracking.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export interface AppLoadingTracking extends LoadingTracking {
1313

1414
export function getAppTracking () {
1515
const vm = getCurrentInstance() as CurrentInstance | null
16-
const root = vm?.$root ?? vm?.root
16+
const root = vm?.$root ?? vm?.root ?? vm?.proxy?.$root as CurrentInstance | null | undefined
1717
if (!root) {
1818
throw new Error('Instance $root not found')
1919
}

0 commit comments

Comments
 (0)