You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Strings passed to the default case in this function are being turned into NaN. Having compared this to the OTP-RR code it looks like the global isNan was swapped with Number.isNaN when being added to OTP-UI's core utils. Number.isNaN will not implicitly coerse strings.
Worth noting that empty string values passed to the default condition still return NaN even with the global version of isNaN being used. We should be able to gracefully handle this condition in url query params
There are a couple of ways to address this. Feel free to reach out if you need some ideas or guidance. I think the best solution here will be to coerce the value with to a number before checking it with Number.isNaN
If this is the way it's intended to work then we can double-check this after the utility that constructs the OTP routing params has been released.
Thanks!
The text was updated successfully, but these errors were encountered:
We found a bug with the
planParamsToQuery
function inside ofv0.0.12
ofcore-utils
otp-ui/packages/core-utils/src/query.js
Line 213 in c6e6225
Strings passed to the default case in this function are being turned into NaN. Having compared this to the OTP-RR code it looks like the global
isNan
was swapped withNumber.isNaN
when being added to OTP-UI's core utils.Number.isNaN
will not implicitly coerse strings.Worth noting that empty string values passed to the default condition still return NaN even with the global version of isNaN being used. We should be able to gracefully handle this condition in url query params
There are a couple of ways to address this. Feel free to reach out if you need some ideas or guidance. I think the best solution here will be to coerce the value with to a number before checking it with
Number.isNaN
If this is the way it's intended to work then we can double-check this after the utility that constructs the OTP routing params has been released.
Thanks!
The text was updated successfully, but these errors were encountered: