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
Attempting to invoke $pad with a decimal value length like 2.1 results in RangeError: invalid array length being thrown. This is due to the padding array being instantiated with a non-integer length which is not allowed. This exception is not caught anywhere in the call stack.
We should either floor width before using it to calculate padLength or throw a JSONata exception.
Repro: $pad("s", 2.1, " ")
The text was updated successfully, but these errors were encountered:
melalawi
changed the title
$pad Function With Decimal-Value Width Results in Uncaught RangeError
$pad Function With Non-Integer Width Results in Uncaught RangeError
Oct 2, 2024
Hello,
Attempting to invoke
$pad
with a decimal value length like2.1
results inRangeError: invalid array length
being thrown. This is due to the padding array being instantiated with a non-integer length which is not allowed. This exception is not caught anywhere in the call stack.We should either floor
width
before using it to calculatepadLength
or throw a JSONata exception.Repro:
$pad("s", 2.1, " ")
The text was updated successfully, but these errors were encountered: