Skip to content

Commit

Permalink
Merge pull request #96 from syt123450/zz
Browse files Browse the repository at this point in the history
[WIP] Country Code
  • Loading branch information
AlexisAnzieu committed Jul 5, 2018
2 parents bb3ac2a + 63e5cbd commit c211392
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
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

0 comments on commit c211392

Please sign in to comment.