-
Notifications
You must be signed in to change notification settings - Fork 220
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
$formatNumber function returns NaN.00 when null in input #165
Comments
Yep, that's a bug - thanks for reporting. |
@andrew-coleman - thanks for the reply. I think you are missing the following check: |
@raj-work Good spot! As you may have already seen, we're certainly open to taking pull requests. |
@andrew-coleman , @mattbaileyuk - I updated the jsonata.js and merged my changes. Please let me know if you see any issues. Thanks. |
Hi,
We are using formatNumber to return an amount field properly formatted. But instead we are getting a "-NaN.00".
Example:
$formatNumber($number(Account.Order[0].Product[2].Price), "#0.00")
returns "-NaN.00"
in the Account example of TryJSONata.
The expected behavior is it should return a null since the inside evaluation will return a null.
The text was updated successfully, but these errors were encountered: