polymerfire icon indicating copy to clipboard operation
polymerfire copied to clipboard

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

Open tograd opened this issue 7 years ago • 2 comments

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 avatar Aug 07 '17 01:08 tograd

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

tograd avatar Aug 07 '17 01:08 tograd

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

tjmonsi avatar Sep 07 '17 03:09 tjmonsi