chore: more non-essential changes from #11690 (#11750)

pull/11752/head
Rich Harris 1 year ago committed by GitHub
parent 329c10eb6c
commit 50cc8a4848
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -2,7 +2,6 @@ import { namespace_svg } from '../../../../constants.js';
import { hydrate_anchor, hydrate_nodes, hydrating } from '../hydration.js'; import { hydrate_anchor, hydrate_nodes, hydrating } from '../hydration.js';
import { empty } from '../operations.js'; import { empty } from '../operations.js';
import { render_effect } from '../../reactivity/effects.js'; import { render_effect } from '../../reactivity/effects.js';
import { remove } from '../reconciler.js';
/** /**
* @param {Element | Text | Comment} anchor * @param {Element | Text | Comment} anchor
@ -60,7 +59,7 @@ export function css_props(anchor, is_html, props, component) {
}); });
return () => { return () => {
remove(element); element.remove();
}; };
}); });
} }

@ -25,7 +25,6 @@ import {
import { source, mutable_source, set } from '../../reactivity/sources.js'; import { source, mutable_source, set } from '../../reactivity/sources.js';
import { is_array, is_frozen } from '../../utils.js'; import { is_array, is_frozen } from '../../utils.js';
import { INERT, STATE_SYMBOL } from '../../constants.js'; import { INERT, STATE_SYMBOL } from '../../constants.js';
import { push_template_node } from '../template.js';
/** /**
* The row of a keyed each block that is currently updating. We track this * The row of a keyed each block that is currently updating. We track this
@ -407,7 +406,7 @@ function reconcile(array, state, anchor, render_fn, flags, get_key) {
for (var i = 0; i < to_destroy.length; i += 1) { for (var i = 0; i < to_destroy.length; i += 1) {
var item = to_destroy[i]; var item = to_destroy[i];
items.delete(item.k); items.delete(item.k);
remove(item.o); item.o.remove();
link(item.prev, item.next); link(item.prev, item.next);
} }
}); });

@ -51,7 +51,6 @@ export function element(anchor, get_tag, is_svg, render_fn, get_namespace, locat
const filename = DEV && location && current_component_context?.function.filename; const filename = DEV && location && current_component_context?.function.filename;
render_effect(() => {
/** @type {string | null} */ /** @type {string | null} */
let tag; let tag;
@ -160,9 +159,4 @@ export function element(anchor, get_tag, is_svg, render_fn, get_namespace, locat
set_current_each_item(previous_each_item); set_current_each_item(previous_each_item);
}); });
return () => {
element?.remove();
};
});
} }

Loading…
Cancel
Save