You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If bindings.length === BindingCount.OnlyOneBindingAvailable and:
target isn't array - function returns bindings
target is array - we fall through to default condition, then in else block function returns bindings
So, in case BindingCount.OnlyOneBindingAvailable - function always returns bindings.
Looks like it's not correct behavior.
The text was updated successfully, but these errors were encountered:
tryvols
changed the title
Looks like incorrect check is in _validateActiveBindingCount
Looks like incorrect behavior is in _validateActiveBindingCount
Dec 14, 2020
It means this service is being requested in a multi inject context. In this case we should return the array of bindings even if this is a multiInject context and we only got one binding. In the following code:
InversifyJS/src/planning/planner.ts
Line 116 in 65596ea
If
bindings.length === BindingCount.OnlyOneBindingAvailable
and:bindings
bindings
So, in case BindingCount.OnlyOneBindingAvailable - function always returns
bindings
.Looks like it's not correct behavior.
The text was updated successfully, but these errors were encountered: