-
-
Notifications
You must be signed in to change notification settings - Fork 8.9k
Open
Labels
🔨 p3-minor-bugPriority 3: this fixes a bug, but is an edge case that only affects very specific usage.Priority 3: this fixes a bug, but is an edge case that only affects very specific usage.has workaroundA workaround has been found to avoid the problemA workaround has been found to avoid the problemneed discussion
Description
Vue version
Commit b555f02, latest in main branch.
Link to minimal reproduction
Steps to reproduce
Create 4 components, each a child of the other.
App -> 1 -> 2 -> 3 -> 4
App and Component 1 each provides a unique value for the key "test" on first render. When Component 2 is re-rendered provide a unique value for the key "test".
What is expected?
It should be expected that Component 4 inherits the new provided value of Component 2, but instead only Component 3 inherits.
What is actually happening?
When provide() is called, it creates a new Object with the prototype of the previous parent's providers, however when this is done in overlap like it is here, it skips one.
First Render:
- Component 1 has Object.create(App.provides)
- Component 2 has Component 1's provides
- Component 3 has Component 2's provides (which is Component 1's provides)
- Component 4 has Component 3's provides (which is Component 1's provides)
Second Render:
- Component 1 has Object.create(App.provides)
- Component 2 has Object.create(Component 1.provides)
- Component 3 has Component 2's provides
- Component 4 has Component 3's old provides (which is Component 1's provides) [Note: Here lies the issue.]
System Info
Any additional comments?
No response
Metadata
Metadata
Assignees
Labels
🔨 p3-minor-bugPriority 3: this fixes a bug, but is an edge case that only affects very specific usage.Priority 3: this fixes a bug, but is an edge case that only affects very specific usage.has workaroundA workaround has been found to avoid the problemA workaround has been found to avoid the problemneed discussion