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
Calling server side javascript functions supplies a string with the letters "null" when the parameter is left blank.
Ideally, you'd have an empty string or a null in the variable you get in your server side javascript environment but for now I am testing for a string with the letters n-u-l-l.
REPRO:
Create a new javascript server side function with at least 1 parameter (using studio) - let's call it x.
Click execute without filling in any parameters
Notice that x will be "null" on the server.
You can return {aaa: x} to see the results or add code like this...
if (x == null) return {"a":"null string"}; << Expect this
if (x == "null") return {"b":"string with n-u-l-l"}; <<<<<<< Get this.
if (x.length == 0) return {"c":"empty string"}; << Could live with this
return {"d": x};
Calling server side javascript functions supplies a string with the letters "null" when the parameter is left blank.
Ideally, you'd have an empty string or a null in the variable you get in your server side javascript environment but for now I am testing for a string with the letters n-u-l-l.
REPRO:
Notice that x will be "null" on the server.
You can return {aaa: x} to see the results or add code like this...
if (x == null) return {"a":"null string"}; << Expect this
if (x == "null") return {"b":"string with n-u-l-l"}; <<<<<<< Get this.
if (x.length == 0) return {"c":"empty string"}; << Could live with this
return {"d": x};
Results:
[
{
"@type": "d",
"@Version": 0,
"b": "string with n-u-l-l"
}
]
The text was updated successfully, but these errors were encountered: