FirebaseExtended / polymerfire

Polymer Web Components for Firebase
https://www.webcomponents.org/element/firebase/polymerfire
MIT License
459 stars 142 forks source link

Ran into weird issue where firebase-document only updated when children were removed, but not when added #255

Open tograd opened 7 years ago

tograd commented 7 years ago

I might make a reduced example if requested but cant be arsed right now.

I traced the issue to this code:

https://github.com/firebase/polymerfire/blob/091c14a0e5be673d19d992f96b46f75a04f35de2/firebase-document.html#L184-L189

It ran but did not trigger any changes on my "end" and I couldn't figure out how to fix it. So I modified ( Object.keys(value).length < Object.keys(this.data).length) to !== which obviously fixed it but may hurt performance?

I'm using polymer 2.0.2 and polymerfire 2.0.0

tograd commented 7 years ago

It's very late I'll look into this again tomorrow to make sure I'm not making some huge mistake

tjmonsi commented 7 years ago

@tograd If you can create a quick repo to fork on, I can check it from there :) Thanks