Polymer / polymer

Our original Web Component library.
https://polymer-library.polymer-project.org/
BSD 3-Clause "New" or "Revised" License
22.05k stars 2.02k forks source link

Ensure parent is linked to child templateInfo. Fixes fastDomIf unstamping issue. #5587

Closed kevinpschaaf closed 4 years ago

kevinpschaaf commented 4 years ago

_stampTemplate was failing to link the parent field of the templateInfo linked tree. This resulted in the lastChild not being correctly unlinked if it was unstamped, causing subsequent children to be linked off of the removed lastChild. Since the host iterates the tree from firstChild, it would never see the added templates and their effects (updates subsequent to first render) would not be run.

kevinpschaaf commented 4 years ago

Added more tests to catch issues that would arise from not setting parent reference.