allow cleanup to be returned directly

pull/15045/head
Rich Harris 8 months ago
parent ed3bf0183e
commit 0690ba225a

@ -25,6 +25,6 @@ export function is_attachment_key(key) {
*/
export function attach(node, get_fn) {
effect(() => {
get_fn()(node);
return get_fn()(node);
});
}

Loading…
Cancel
Save