-
-
Notifications
You must be signed in to change notification settings - Fork 33.7k
Closed
Labels
Description
Version
2.5.21
Reproduction link
https://codepen.io/anon/pen/oJLdMN
Open the link and see the error message in dev console.
Steps to reproduce
Create two mixins with a provide object using Symbol as it's key field. Then assign these mixins to a component.
What is expected?
The child component can access two provide object without any error.
What is actually happening?
The child component can only access the last provide object, while the first one is undefined.
Diving into the source code, the reason of this issue is that Vue uses Object.keys
to iterate over the provide
object while merging mixins. However, Object.keys
won't return Symbol keys. see the code.
Maybe we should use for ... in
loop, which will iterate through Symbol keys correctly.