I have a simple Firebase function that updates some data. However, the interpreter says that the first argument contains \"undefined\" in property \'users.tester1\'. Can somebod
The underlying Firebase library throws an error when you try to update a property with the value of undefined. It will allow null (and will essentially ignore them).
You'll need your raw transformer to ensure that it ignores all prototype methods and properties and converts undefined to null or removes any properties with with undefined values altogether.
var addUser = function(name, edges){
if(!checkIfUsernameExists(name) && !checkIfNodeNameExists(name) && !checkIfEdgeNameExists(name)){
var time = Firebase.ServerValue.TIMESTAMP;
//HERE: I think the error is on this line
refs.users.update(objify(name, "filler"));
refs.users.child(name).set({
"id" : time || null,
"edges" : "filler" || null
});
refs.users.child(name).child("edges").update({
"to" : "filler" || null,
"from" : "filler" || null
});
addNode(new Node(name, time, name));