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

Co-authored-by: Leonidaz <lbarenblit@gmail.com>
pull/15045/head
Rich Harris 8 months ago committed by GitHub
parent 869977157e
commit 1664fd8118
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -6,6 +6,6 @@ import { effect } from '../../reactivity/effects.js';
*/ */
export function attach(node, get_fn) { export function attach(node, get_fn) {
effect(() => { effect(() => {
return get_fn()(node); return (get_fn())?.(node);
}); });
} }

Loading…
Cancel
Save