Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

suppress "undefined" when country code is empty #453

Open
ghost opened this issue Mar 15, 2019 · 1 comment
Open

suppress "undefined" when country code is empty #453

ghost opened this issue Mar 15, 2019 · 1 comment

Comments

@ghost
Copy link

ghost commented Mar 15, 2019

The countries which have a country code displays correct with the number. Countries without a value display's as undefined. My script is in the minified version. What to add that I can suppress the countries without a value?

I was searching long time, checked the pull requests and issues, but I can't find the answer for me.

@remiemalik
Copy link

The countries which have a country code displays correct with the number. Countries without a value display's as undefined. My script is in the minified version. What to add that I can suppress the countries without a value?

I was searching long time, checked the pull requests and issues, but I can't find the answer for me.

Hi Ghost,

You can use the following code:

onRegionTipShow: function(e, el, code){ if(gdpData[code] === undefined) el.html(el.html()+' (no orders)'); else el.html(el.html()+' (Orders: '+gdpData[code]+')'); }

Add this to the parameters. Enjoy!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant