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
Would love for it to essentially default to the flag being off if it can't find the flag in the provider and then do something like a console.warn to let me know that the flag is missing rather than throwing a 'cannot split on undefined' error message.
Suggested Solution(s)
Check if the flag doesn't exit
If the flag requested by the hook doesn't exist, treat it as if the flag were disabled and then throw a warning into the console
Your Environment
Software
Version
Flagged
^2.0.8
React
17
Browser
Chrome
npm/yarn
npm
The text was updated successfully, but these errors were encountered:
Current Behavior
When I have code that looks like this:
We get an exception thrown from this split method
Expected Behavior
Would love for it to essentially default to the flag being off if it can't find the flag in the provider and then do something like a
console.warn
to let me know that the flag is missing rather than throwing a 'cannot split on undefined' error message.Suggested Solution(s)
Check if the flag doesn't exit
If the flag requested by the hook doesn't exist, treat it as if the flag were disabled and then throw a warning into the console
Your Environment
The text was updated successfully, but these errors were encountered: