Skip to content

Commit 299ec80

Browse files
committed
Removes 'n' with 'short'
1 parent 74197db commit 299ec80

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -383,10 +383,10 @@ Please check http://www.mapcode.com to see if there is a more up-to-date version
383383

384384
# Version History
385385

386-
### 2.4.1
386+
### 2.4.1 - 2.4.2
387387

388388
* Fixed bug in `getTerritoryAlphaCode` when getting the shortest unambiguous code for `US-CA`,
389-
which is `CA`, not `US-CA`.
389+
which is `CA`, not `US-CA`.
390390

391391
### 2.4.0
392392

mapcode.js

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ var mapcode_dataversion = "2.3.0";
162162

163163
// *************************** mapcode_org *********************
164164

165-
var mapcode_javaversion = '2.4.1/Data' + mapcode_dataversion;
165+
var mapcode_javaversion = '2.4.2/Data' + mapcode_dataversion;
166166

167167
/// PRIVATE returns string without leading spaces and plus-signs, and trailing spaces
168168
function trim(str) {
@@ -456,11 +456,9 @@ function getTerritoryAlphaCode(territory, format) {
456456
return short;
457457
}
458458
// shortest POSSIBLE
459-
var parent = getParentOf(territoryNumber);
460-
var n = full.substr(hyphen + 1);
461-
// see if n occurs multiple times, if not, don't bother with parent
459+
// see if short occurs multiple times, if not, don't bother with parent
462460
var count = 0;
463-
var i = aliases.indexOf(n + '=');
461+
var i = aliases.indexOf(short + '=');
464462
if (i >= 0) {
465463
count = 2;
466464
} else {

0 commit comments

Comments
 (0)