Skip to content
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

[compat] component data is overwritten by mixins #3852

Closed
KaelWD opened this issue May 30, 2021 · 1 comment
Closed

[compat] component data is overwritten by mixins #3852

KaelWD opened this issue May 30, 2021 · 1 comment
Labels
❗ p4-important Priority 4: this fixes bugs that violate documented behavior, or significantly improves perf. 🐞 bug Something isn't working

Comments

@KaelWD
Copy link
Contributor

KaelWD commented May 30, 2021

Version

3.1.0-beta.6

Reproduction link

https://codepen.io/kaelwd/pen/JjWOrpq?editors=1011

Steps to reproduce

Consume a mixin that defines its own data

What is expected?

The mixin data should be merged with the component data

What is actually happening?

Only the mixin data is used. If there are instead two mixins that define data, deepMergeData throws an error and nothing is rendered: https://codepen.io/kaelwd/pen/gOmXGew?editors=1011

@KaelWD
Copy link
Contributor Author

KaelWD commented May 30, 2021

Should deepMergeData return to at the end? mergedDataFn's return is always undefined otherwise.

https://github.com/vuejs/vue-next/blob/cd337149353d03446850b5f45b817f3fa160e5ff/packages/runtime-core/src/compat/data.ts#L6-L22

@LinusBorg LinusBorg linked a pull request May 31, 2021 that will close this issue
@posva posva added 🐞 bug Something isn't working ❗ p4-important Priority 4: this fixes bugs that violate documented behavior, or significantly improves perf. labels May 31, 2021
@github-actions github-actions bot locked and limited conversation to collaborators Oct 19, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
❗ p4-important Priority 4: this fixes bugs that violate documented behavior, or significantly improves perf. 🐞 bug Something isn't working
Projects
None yet
2 participants