-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Updating nested item duplicates items in list. #800
Comments
It happens in Chrome (browser) too. |
@leandroz Can you create a plnkr with some steps so I can debug? |
@davideast @cartant thanks both, I will do it now. |
I am getting an error trying with firebase 3.6.6, https://plnkr.co/edit/12sFkTKA2fLCp6m4prw9?p=preview |
@leandroz There is a SystemJS issue with versions of Firebase more recent than 3.4.0 and AngularFire2. It's mentioned in this issue and there's a related SO question, too. I've updated the plunk with this workaround and it now works with Firebase 3.6.7, so you might want to fork it again. |
@cartant thanks for the help, here you have the plunk with some changes, https://plnkr.co/edit/CDiApWr7r1JnqzcGwLaA?p=preview, I couldn't reproduce exactly the duplication, but here you will see that one subscription to all the users gets only 1 and not the 3 users, I am pretty sure is related. |
@leandroz There are a couple of uses of |
@cartant stupid mistake, I cannot reproduce this, I will try to debug in my app and see what I can find, closing until then. |
Version info
Angular: "2.2.1"
Firebase: "^3.6.6"
AngularFire: "^2.0.0-beta.7"
Other (e.g. Ionic/Cordova, Node, browser, operating system): Ionic: "^2.0.0" in iOS device.
How to reproduce these conditions
Steps to set up and reproduce
Basically I have a list of users with information like:
Then I have 2 subscriptions:
Everytime I do an update like this:
A record is duplicated in the listener of the allUsersRef observable.
In this case I have 3 users and after doing 3 updates the 2 of them that are not the current user get duplicated (one 2 times and the other 3 times)
Sample data and security rules
Debug output
** Errors in the JavaScript console **
** Output from
firebase.database().enableLogging(true);
**** Screenshots **
Expected behavior
Get only 3 users without duplicates.
Actual behavior
Got 6 users with duplicates.
The text was updated successfully, but these errors were encountered: