As the title says, there are cases where content is replaced entirely, but the components initial loader on mount still exists, and therefore triggers multiple times, and then behaves unexpectedly because of sudden multiple triggers on non-existent elements in the DOM.
Current fixes
// Bail early if node doesn't exists anymore
if (!document.body.contains(node)) {
return;
}
As the title says, there are cases where content is replaced entirely, but the components initial loader on mount still exists, and therefore triggers multiple times, and then behaves unexpectedly because of sudden multiple triggers on non-existent elements in the DOM.
Current fixes