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
Later on you actually provide a value so it can be injected instead of the factory generated one:
providers: [provideSomeValue(0)]
Because of how the provider function (provideSomeValue) created by createProvideFn decides whether to use the configured factory or the value that was provided to provideSomeValue, any provided value that evaluates to falsy (0, "", false, null, undefined, etc) will be disregarded and the factory will be used instead.
Instead of evaluating the optionally passed argument itself, maybe evaluate if an argument was actually passed instead?
The text was updated successfully, but these errors were encountered:
diegovilar
added a commit
to diegovilar/ngxtension-platform
that referenced
this issue
Nov 19, 2023
Suppose for whatever reason you want to provide a value like this:
Later on you actually provide a value so it can be injected instead of the factory generated one:
Because of how the provider function (
provideSomeValue
) created by createProvideFn decides whether to use the configured factory or the value that was provided toprovideSomeValue
, any provided value that evaluates to falsy (0, "", false, null, undefined, etc) will be disregarded and the factory will be used instead.Instead of evaluating the optionally passed argument itself, maybe evaluate if an argument was actually passed instead?
The text was updated successfully, but these errors were encountered: