Here's the code I have to set some data:
firebase.database().ref(key).set(val);
which returns
Promise {[[PromiseStatus]]: "pending", [[PromiseValue]]: undefined}
It suggests that I can pass it a then/catch handler, but writing:
log = function(x) {console.log(x)
firebase.database().ref(key).set(val).then(log).catch(log)
has the exact same effect (nothing is returned/printed either way)
The wierd thing is that this intermittently works, I just can't figure out why.
setdoesn't return anything, even in the promise, but it does actually work. it'sgetthat actually passes a value to the promise.