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-documentelement on a page. - In your database create two locations:
/ref1and/ref2with the same value (i.e.true). - Open the page in your browser and go to dev tools.
- Set the element's path property to
/ref1and check thedataproperty value (true). - Set the element's path property to
/ref2and check thedataproperty value (true). - Go to your firebase console and change the value of
/ref1tofalse. - Check the element's
dataproperty value (false).
Browsers Affected
- [x] Chrome
+1