Skip to content

Commit

Permalink
fix: territoryFormName is defined twice
Browse files Browse the repository at this point in the history
  • Loading branch information
Vasil Raev authored and danielkaradachki committed Aug 24, 2018
1 parent 0b85c0e commit 2720adb
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions src/cldr/territory.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,5 @@
import { cldr } from './info';

function territoryFromName(name) {
const parts = name.split("-");
const length = parts.length;

if (length > 1) {
const territory = parts[ length - 1 ];
return territory.toUpperCase();
}
}

function territoryFromName(name, identity) {
const likelySubtags = cldr.supplemental.likelySubtags;
let parts = name.split("-");
Expand Down

3 comments on commit 2720adb

@mark-atk
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This issue was causing the following error:
Module parse failed: Identifier 'territoryFromName' has already been declared (13:9)

Fix was to downgrade to version 1.4.2.
Any estimate for when this change will be pushed out to NPM package? It seems it still exists in version 1.5.0?

@danielkaradachki
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if I understand the question. The latest official version of the kendo-intl package is 1.4.2 and it includes the fix:
https://github.com/telerik/kendo-intl/releases

Please clarify.

@mark-atk
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Strange, we had version ^1.5.0 in our packages but still had the double declaration. I just noticed that we had '@progress/telerik/kendo-intl' as opposed to just 'telerik/kendo-intl' as the package though. Changing it to just 'telerik/kendo-intl' referencing version 1.4.2 solved the issue for us.

Please sign in to comment.