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 be better to check if country has found before trying to get [keyToGet]
Steps to Reproduce
Pass unrelated code or GB for UK
Screenshots
Context
I am using flagpack-react to render flags based on country code passed by our end. Looks like we have mismatch for some country alpha 2 codes, but instead of breaking applicaiton, it would be better to return null from the Flag component
Your Environment
Version used: react-flagpack: ^0.1.1
Browser Name and version: Chrome
Operating System and version (desktop or mobile): MacOS
The text was updated successfully, but these errors were encountered:
Please check all that apply
Expected Behavior
JS error shouldn't break whole application, can return undefined instead of breaking app
Current Behavior
Breaking app in case there is not country related to passed country code
Possible Solution
Issue is here:
flagpack-core/index.js
Line 10 in 55fb554
Would be better to check if country has found before trying to get
[keyToGet]
Steps to Reproduce
Pass unrelated code or
GB
for UKScreenshots
Context
I am using
flagpack-react
to render flags based on country code passed by our end. Looks like we have mismatch for some country alpha 2 codes, but instead of breaking applicaiton, it would be better to return null from theFlag
componentYour Environment
The text was updated successfully, but these errors were encountered: