Skip to content

Fix getAppTracking for Vue 3 support #1040

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Oct 15, 2020
Merged

Fix getAppTracking for Vue 3 support #1040

merged 2 commits into from
Oct 15, 2020

Conversation

frandiox
Copy link
Contributor

@Akryum In Vue 2's composition API, the instance has a vm.$root property with the root component.

However, in Vue 3, the property is called vm.root (without dollar).

With this small change I was able to upgrade a project using latest @vue/apollo-composable alpha to Vue 3.

v2 instances have a `vm.$root` property while v3 ones have `vm.root`
@ivansieder
Copy link

@frandiox shouldn't this also be updated in @antfu's vue-demi? AFAIK the issue comes from a piece of code which uses vue-demi?

@frandiox
Copy link
Contributor Author

frandiox commented Sep 2, 2020

@ivansieder I don't think vue-demi has anything to do here. It simply redirects to Vue 2 or Vue 3 conditionally. The problem is that Vue 2's composition API is not exactly the same as Vue 3.

I guess it could be possible to fix it in the composition API itself by aliasing root to $root and any other Vue internal change 🤔

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants