Skip to content

Commit 0690ba2

Browse files
committed
allow cleanup to be returned directly
1 parent ed3bf01 commit 0690ba2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/svelte/src/internal/client/dom/elements/attachments.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,6 @@ export function is_attachment_key(key) {
2525
*/
2626
export function attach(node, get_fn) {
2727
effect(() => {
28-
get_fn()(node);
28+
return get_fn()(node);
2929
});
3030
}

0 commit comments

Comments
 (0)