Skip to content

RangeError (loop in dist/cldr.js) #74

@EngelPika32

Description

@EngelPika32

I'm receiving this error while loading json-objects with globalizejs.

RangeError: Maximum call stack size exceeded
    at merge (pathToProject/node_modules/cldrjs/dist/cldr.js:476:22)
    at pathToProject/node_modules/cldrjs/dist/cldr.js:485:28
    at Array.forEach (<anonymous>)
    at arrayForEach (pathToProject/node_modules/cldrjs/dist/cldr.js:272:17)
    at merge (pathToProject/node_modules/cldrjs/dist/cldr.js:479:3)
    at pathToProject/node_modules/cldrjs/dist/cldr.js:485:28
    at Array.forEach (<anonymous>)
    at arrayForEach (pathToProject/node_modules/cldrjs/dist/cldr.js:272:17)
    at merge (pathToProject/node_modules/cldrjs/dist/cldr.js:479:3)
    at pathToProject/node_modules/cldrjs/dist/cldr.js:485:28

I'm not using cldrjs directly. cldrjs is called by globalize which is called by me using globalize.loadMessages().

To be precise: The error happens when I call the function the second time (aka, with already loaded strings).
Most of these strings are already loaded with globalize. It's also possible that they (the object) are identical to an earlier load.
Loading strings the first time works without any thrown error.

Node&Library-Versions
node: v13.5.0
npm: 6.13.4
globalize: 1.6.0
cldrjs: 0.5.5
cldr-data: 36.0.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions