Possible bug: Eval script keeps returning no input
This code keeps returning no value as input to my Runnable backend script. It should return one string or the other.
Instead, my script gets no input, and throws the error:
4 Replies
I just had to remove the
return
keyword ... I could have sworn I tried that multiple times.
Actually
It looks like the if
keyword isn't even supported in this block, according to the browser console errors.
yeah, I do not know the details, but this should work for you:
another option if need eval but it's a bit hard expression is to create a background runnable, and in the eval just refer to it.
meaning "bg_0.result"
If are not expressions in JavaScript
They are control flow statements
You can however build expressions that have if in them with a bit of tortuous syntax
This is exactly what I ended up doing!