polymerfire
polymerfire copied to clipboard
Changing path in the 'firebase-document' doesn't stop retrieving data from previous reference.
Description
Changing path in the 'firebase-document' element doesn't stop the data
property from being updated when changes occur to previously set database reference.
Expected outcome
When the path changes, the listener on the previous database reference should be turned off, so the data
is retrieved only from the current reference (current path).
Actual outcome
When the path changes, the data
property is being updated by listeners on both, previous and current, references.
Steps to reproduce
- Create
firebase-document
element on a page. - In your database create two locations:
/ref1
and/ref2
with the same value (i.e.true
). - Open the page in your browser and go to dev tools.
- Set the element's path property to
/ref1
and check thedata
property value (true
). - Set the element's path property to
/ref2
and check thedata
property value (true
). - Go to your firebase console and change the value of
/ref1
tofalse
. - Check the element's
data
property value (false
).
Browsers Affected
- [x] Chrome
+1