-
Type: Bug
-
Resolution: Unresolved
-
Priority: Minor - P4
-
None
-
Affects Version/s: None
-
Component/s: None
-
2 - S (<= 1 week)
-
4922
How frequently does the bug occur?
All the time
Description
when calling Realm.User.callFunction, if the Atlas Function in the cloud returns undefined, the JS client on device returns null.
Stacktrace & log output
Unable to find source-code formatter for language: shell. Available languages are: actionscript, ada, applescript, bash, c, c#, c++, cpp, css, erlang, go, groovy, haskell, html, java, javascript, js, json, lua, none, nyan, objc, perl, php, python, r, rainbow, ruby, scala, sh, sql, swift, visualbasic, xml, yaml
n/a
Can you reproduce the bug?
Yes, always
Reproduction Steps
create and publish Atlas Function that returns undefined such as the following:
// returnUndefined.js exports = () => {return;};
then call function from the client:
const res = await app.currentUser.callFunction("returnUndefined"); console.log(res) // null
Version
10.19.3
What SDK flavour are you using?
Atlas App Services (auth, functions, etc.)
Are you using encryption?
No, not using encryption
Platform OS and version(s)
MacOS 11.6.3
Build environment
Node.js v16.13.2
Cocoapods version
No response