-
-
Notifications
You must be signed in to change notification settings - Fork 33.7k
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
optionMergeStrategies.inject #5603
Comments
Thanks for reporting it. This should be an easy first contribution because it needs little to no knowledge of Vue. The file that needs to be modified is at https://github.com/vuejs/vue/blob/dev/src/core/util/options.js. Inject are arrays or object, it should be able to merge both. |
jaj, ok, got it ;) |
Yes. |
I would like to resolve this as my first contribution to the project. |
@ryzokuken Already an opened PR there. :) (#5827) |
Okay. I'll look someplace else to get acquainted with the source. Thanks.
…On Thu 15 Jun, 2017, 2:01 PM JK, ***@***.***> wrote:
@ryzokuken <https://github.com/ryzokuken> Already an opened PR there. :) (
#5827 <#5827>)
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#5603 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AMg3MhXrqcsf1FFMJRH5uZIbZaWbqco-ks5sEOvpgaJpZM4NQsx5>
.
|
Version
2.3.2
Reproduction link
https://jsfiddle.net/yywfw3cL/5/
Steps to reproduce
Make a component extend another one while both parent and child define an injection : the parent' injection is lost (overridden)
What is expected?
Injections to be merged
What is actually happening?
Injections override parent' ones
The injections initialisation looks for the injections own keys - so we cannot merge with a prototype like it is done in function mergeAssets or with "Other object hashes" : props/methods/computed
We instead have to copy the object and extend it in its own properties.
It might be cleaner if it was allowed to use the prototype.
The text was updated successfully, but these errors were encountered: