Skip to content

optionMergeStrategies.inject #5603

@eddow

Description

@eddow

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions