fix: prevent calling remove fn with null value in snippet_effect

pull/9675/head
Oto Dočkal 3 years ago
parent a31b2e1b8e
commit 40a5867fc8

@ -3182,8 +3182,9 @@ export function snippet_effect(get_snippet, node, args) {
const snippet = get_snippet();
untrack(() => snippet(node, args));
return () => {
if (block.d !== null) {
remove(block.d);
const d = (is_array(block.d) ? block.d[0] : block.d) ?? null;
if (d !== null) {
remove(d);
}
};
}, block);

Loading…
Cancel
Save