Skip to content
New issue

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

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

Already on GitHub? # to your account

Country Code #96

Merged
merged 3 commits into from
Jul 5, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions docs/en/Country_Code.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
##Country Code

| Country Code | Country Name |
| ------------- | ------------- |
| ZZ | [Unknown Country](https://stackoverflow.com/questions/20973960/i-am-getting-zz-as-country-code-when-using-pytz) |
13 changes: 12 additions & 1 deletion src/dataPreprocessors/GeometryDataProcessor.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,21 @@ GeometryDataProcessor.prototype.processDetail = function ( controller ) {

var exporterName = set.e.toUpperCase();
var importerName = set.i.toUpperCase();

if (exporterName == "ZZ" || importerName == "ZZ") {
console.group("ZZ unknown country")
console.log("ZZ country code detected for current countries this will not be print on the globe");
console.log({exporterName,importerName})
console.groupEnd();

delete controller.inputData[s];

continue;
}

var exporter = CountryData[ exporterName ];
var importer = CountryData[ importerName ];

if (exporter==null) throw exporterName+" is not referenced as a country code! See the full list there : https://github.com/syt123450/giojs/blob/master/src/countryInfo/CountryData.js";
if (importer==null) throw importerName+" is not referenced as a country code! See the full list there : https://github.com/syt123450/giojs/blob/master/src/countryInfo/CountryData.js";

Expand Down