Skip to content

Commit

Permalink
Fixes matomo-org#4402, fix fips code issues in switzerland svg file &…
Browse files Browse the repository at this point in the history
… add safe guard against JS exception in visitor-map.js.
  • Loading branch information
diosmosis committed Jan 8, 2014
1 parent 23a1c9d commit 39cfde0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion plugins/UserCountryMap/javascripts/visitor-map.js
Expand Up @@ -687,7 +687,7 @@

function regionCode(region) {
var key = UserCountryMap.keys[iso] || 'fips';
return key.substr(0, 4) == "fips" ? region[key].substr(2) : region[key]; // cut first two letters from fips code (=country code)
return key.substr(0, 4) == "fips" ? (region[key] || "").substr(2) : region[key]; // cut first two letters from fips code (=country code)
}

function regionExistsInMap(code) {
Expand Down

0 comments on commit 39cfde0

Please sign in to comment.