Skip to content

Incorrect error message when value is NaN #18

@cjmling

Description

@cjmling
convert(value, {
      from: 'USD',
      to: 'JPY',
      base: 'USD',
      rates: exchangeRates,
    })

when value is NaN it throw ``ratesobject does not contain eitherfrom` or `to` currency!` . Which seems unrelated.

Should not it throw error related to value is NaN instead?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions