Details
-
Bug
-
Resolution: Fixed
-
Major
-
6.5.0
-
Untriaged
-
Centos 64-bit
-
Unknown
Description
I'm trying to return undefined value from js function:
function f(a){
|
let arr1={"a":1,"b":2}; |
return arr1[a]; |
}
|
alert(f("c")); |
Browser js console alerts "undefined", which is totally acceptable, since I don't have a key "c" in my map.
Doing same thing using js inline function:
curl -X GET http://192.168.10.10:35398/api/v1/functions |
{"name":"math","id":"f:39:45:b8:13:16:40:9b","code":"function add(a) { let arr1 = {\"a\":1, \"b\":2}; return arr1[a]; }"} |
|
and calling this function:
execute FUNCTION javaScriptAdd("c") |
gives me this:
[
|
{
|
"code": 10109,
|
"msg": "Error executing function javaScriptAdd (math:add): invalid character 'u' looking for beginning of value - cause: invalid character 'u' looking for beginning of value"
|
}
|
]
|
Attachments
For Gerrit Dashboard: MB-35146 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
112248,1 | [MB-35146] Use JSON null for undefined datatype | unstable | eventing-ee | Status: ABANDONED | 0 | 0 |