googlearchive / firebase-util

An experimental toolset for Firebase
http://firebase.github.io/firebase-util
MIT License
276 stars 58 forks source link

Change queue.handler to send null if the queue has no errors #74

Open maxrevilo opened 8 years ago

maxrevilo commented 8 years ago

This will make Firebase Util compatible with AngularFire, if queue.handler sends undefined instead of null AngularFire won't trigger the callbacks.

I tried my best with the tests, and I had to change two tests in test/NormalizedCollection/Record.spec.js.

katowulf commented 8 years ago

if queue.handler sends undefined instead of null AngularFire won't trigger the callbacks.

Is this a bug in AF? Sounds like it probably is. Is there are error being thrown?

katowulf commented 8 years ago

Thanks, btw. Looks like a great PR. It will take me a bit to run the tests and get it merged. Ping me if you don't see progress in a week.

maxrevilo commented 8 years ago

Ok.

No there is no error being thrown. At the beginning I though that was an error in AF, but AF works perfect with firebase.js. AF expects the first parameter of the callbacks to be null if there is no errors, and thats what firebase.js does. For that reason I though that I should try to change Firebase Utils instead of AF.

jaufgang commented 8 years ago

This issue fixes issue #56, which continues to vex me. Please merge.