rxaviers / cldrjs

Simple CLDR traverser
MIT License
155 stars 30 forks source link

Issue with release 0.5.4 published to npm #72

Closed amsourav closed 3 years ago

amsourav commented 3 years ago

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
rxaviers commented 3 years ago

Thank you. 0.5.5 released with the fix. Please let me know if you find any issues. Thanks

On Sun, Oct 25, 2020, 8:17 AM sourav sarkar notifications@github.com wrote:

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 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.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/rxaviers/cldrjs/issues/72, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAHMD47TM4PFT7BYSY2E4STSMQCMXANCNFSM4S6IKFVQ .

amsourav commented 3 years ago

Thanks @rxaviers