Skip to content
This repository has been archived by the owner on Feb 7, 2024. It is now read-only.

Vue 2.7.14 breaks @ProvideReactive/@InjectReactive #451

Open
ahumellihuk opened this issue Apr 20, 2023 · 2 comments
Open

Vue 2.7.14 breaks @ProvideReactive/@InjectReactive #451

ahumellihuk opened this issue Apr 20, 2023 · 2 comments

Comments

@ahumellihuk
Copy link

When upgrading a project to latest Vue 2.7 release (2.7.14) I've encountered a problem, where @ProvideReactive/@InjectReactive don't work as expected resulting in some (not all) injected values to be undefined.

I've created a reproducer here from a Vite starter template: https://github.com/ahumellihuk/reproducer-vue-2.7.14-provide-inject

It looks to me like the change to blame is vuejs/vue@d1899ca (vuejs/vue#12854).

Given this project is now deprecated I'm not sure if a fix is feasible on vue-property-decorator side. We are sticking with 2.7.13 for the time being before we're able to migrate to Vue 3, but I'll raise this in Vue repository too in case a quick fix is possible on their side.

@petezhang
Copy link

I think it was caused by the typescript version. I have the same problem when I upgrade the Typescript to 5.x. But it works well in Typescript 4.x with Vue 2.7.14

@ahumellihuk
Copy link
Author

I think it was caused by the typescript version. I have the same problem when I upgrade the Typescript to 5.x. But it works well in Typescript 4.x with Vue 2.7.14

Thanks for your comment @petezhang! However, when I tested your theory against my reproducer repository by lowering the TypeScript version range from ^5.0.0 to ^4.0.0, it didn't stand - the same problem appears on 2.7.14+ with TypeScript 4.x and 5x as far as I can see when run locally. Could there be some additional factor in your 5.x upgrade?

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

No branches or pull requests

2 participants