Expected behavior
Returns -1 as it does when it does not find the substring
Additional context
We use optionals, and we often do myValue.orValue("") to run conditionals on strings, but here doing myValue.orValue("").indexOf throws an error unexpectedly
Describe the bug
"".indexOf("foo")
returnsindex out of range: 0
instead of-1
when it runs against an empty stringTo Reproduce Check which components this affects:
Sample expression and input that reproduces the issue:
Test setup:
Expected behavior Returns -1 as it does when it does not find the substring
Additional context We use optionals, and we often do
myValue.orValue("")
to run conditionals on strings, but here doingmyValue.orValue("").indexOf
throws an error unexpectedly