Polymer / polymer

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

[1.x] observeNodes can result in error if observed node is detached early #5524

Closed kevinpschaaf closed 2 years ago

kevinpschaaf commented 5 years ago

Description

A race condition can result in the following error if observeNodes is used on an element which has a <content> element added to it and the element is subsequently detached.

TypeError: Cannot read property 'get' of undefined
    at DomApi.EffectiveNodesObserver._unobserveContentElements

Live Demo

https://jsbin.com/luhihec/edit?html,console,output

Steps to Reproduce

See demo

Expected Results

No error is thrown.

Actual Results

Error above thrown

Versions

stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] commented 2 years ago

This issue has been automatically closed after being marked stale. If you're still facing this problem with the above solution, please comment and we'll reopen!