chore: remove parent DOM before children DOM (#11038)

pull/11035/head
Dominic Gannaway 9 months ago committed by GitHub
parent 92909834f0
commit b210fe3c9d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -234,6 +234,12 @@ export function branch(fn) {
* @returns {void}
*/
export function destroy_effect(effect) {
var dom = effect.dom;
if (dom !== null) {
remove(dom);
}
destroy_effect_children(effect);
remove_reactions(effect, 0);
set_signal_status(effect, DESTROYED);
@ -246,10 +252,6 @@ export function destroy_effect(effect) {
effect.teardown?.call(null);
if (effect.dom !== null) {
remove(effect.dom);
}
var parent = effect.parent;
// If the parent doesn't have any children, then skip this work altogether

Loading…
Cancel
Save