Fix issue of missing shard when a members injection binding exists in a parent component. #3151
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fix issue of missing shard when a members injection binding exists in a parent component.
Fixes #3143
This issue occurs in MembersInjectionMethods, where we use the key to look-up the binding. The problem is that we were using BindingGraph.membersInjectionBinding(Key) and BindingGraph.contributionBinding(Key) which can return bindings in parent components. We should have been using BindingGraph.localMembersInjectionBinding(Key) and BindingGraph.localContributionBinding(Key) instead to ensure we get a binding from the current component rather than a parent.
See #3143
RELNOTES=Fixes #3143: Fix issue with missing shard when a members injection binding exists in a parent component.