polymerfire icon indicating copy to clipboard operation
polymerfire copied to clipboard

Changing path in the 'firebase-document' doesn't stop retrieving data from previous reference.

Open mchyb opened this issue 7 years ago • 1 comments

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

  1. Create firebase-document element on a page.
  2. In your database create two locations: /ref1 and /ref2 with the same value (i.e. true).
  3. Open the page in your browser and go to dev tools.
  4. Set the element's path property to /ref1 and check the data property value (true).
  5. Set the element's path property to /ref2 and check the data property value (true).
  6. Go to your firebase console and change the value of /ref1 to false.
  7. Check the element's data property value (false).

Browsers Affected

  • [x] Chrome

mchyb avatar Apr 04 '17 12:04 mchyb

+1

kaseyhinton avatar Apr 15 '17 06:04 kaseyhinton