rxaviers / cldrjs

Simple CLDR traverser

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Issue with release 0.5.4 published to npm

amsourav opened this issue · comments

Hi,

While using this library I found out that there is small typo in the release 0.5.4 which causes an exception in some cases.
Inside bundleLookup the code is iterating over availableBundleMapQueue. When maxBundle is undefined, availableBundleMapQueue is spliced with current index i of the iteration. There should be an i variable in the callback of arrayForEach.

I checked the source code, but it looks like that the missing index is already there. Building the library again should solve the problem.

Here is a screenshot of dist/cldr.js referencing the issue

Screenshot 2020-10-25 at 4 28 05 PM