-
-
Notifications
You must be signed in to change notification settings - Fork 30
Open
Description
MutationsDataSnapshot forEach method runs its callback on mutations Array through Array.prototype.every function. Thus, if the callback does not return true it will only be run once on first mutation.
Docs should be updated to reflect this behavior.
Current example :
chatRef.on('mutations', snap => {
snap.forEach(mutationSnap => {
handleMutation(mutationSnap);
});
})
Should at least include :
chatRef.on('mutations', snap => {
snap.forEach(mutationSnap => {
handleMutation(mutationSnap);
return true; // Return true to continue iterating mutations
});
})
Metadata
Metadata
Assignees
Labels
No labels