File tree Expand file tree Collapse file tree 2 files changed +5
-7
lines changed Expand file tree Collapse file tree 2 files changed +5
-7
lines changed Original file line number Diff line number Diff 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
Original file line number Diff line number Diff 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
168168function 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 {
You can’t perform that action at this time.
0 commit comments