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

Vue.extend causes nested mixins to be merged twice #8865

Closed
KaelWD opened this issue Sep 29, 2018 · 3 comments · Fixed by #8870
Closed

Vue.extend causes nested mixins to be merged twice #8865

KaelWD opened this issue Sep 29, 2018 · 3 comments · Fixed by #8870

Comments

@KaelWD
Copy link
Contributor

KaelWD commented Sep 29, 2018

Version

2.5.17

Reproduction link

https://codepen.io/anon/pen/ReNVra?editors=0011

Steps to reproduce

Open the console

What is expected?

"mixinA created"
"mixinB created"
"ChildComponent created"

What is actually happening?

"mixinA created"
"mixinA created"
"mixinB created"
"ChildComponent created"

MixinB.options still has mixins, which gets applied again if used in mixins: [] or extends: even though Vue.extend() has already done that

@posva
Copy link
Member

posva commented Sep 29, 2018

Don't use Vue.extend on a mixin, a mixins are plain objects

@posva posva closed this as completed Sep 29, 2018
@KaelWD
Copy link
Contributor Author

KaelWD commented Sep 29, 2018

Not if you use typescript they aren't.

@johnleider
Copy link
Contributor

Can you provide an example of how to handle this when using typescript @posva ?

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 a pull request may close this issue.

3 participants