Skip to content

E_PAR_OUT_OF_RANGE: Parameter minimumFractionDigits has value NaN out of range [0, 20]. #472

@dpolivy

Description

@dpolivy

Locale: ja-JP
Currency Code: JPY

Calling currencyFormatter with the following as options results in the exception in the title:

    {
        maximumFractionDigits: 0
    }

It seems that in this case, the logic at this line might not be correct? minimumFractionDigits is undefined, and persists that way.
https://github.com/jquery/globalize/blob/master/src/number/format-properties.js#L81

I haven't had time to dig in more to see if this is a data, cldrjs, or code issue, but hopefully it's an easy fix.

This is blocking Japanese users on our site as it just blows up trying to format currency.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions