fix: Forgot to save

pull/10320/head
S. Elliott Johnson 2 years ago
parent 14805f96ce
commit 3756ce5a4f

@ -2846,13 +2846,13 @@ export function sanitize_slots(props) {
* @param {(() => any)[]} args * @param {(() => any)[]} args
* @returns {void} * @returns {void}
*/ */
export function snippet_effect(get_snippet, node, args) { export function snippet_effect(get_snippet, node, ...args) {
const block = create_snippet_block(); const block = create_snippet_block();
render_effect(() => { render_effect(() => {
// Only rerender when the snippet function itself changes, // Only rerender when the snippet function itself changes,
// not when an eagerly-read prop inside the snippet function changes // not when an eagerly-read prop inside the snippet function changes
const snippet = get_snippet(); const snippet = get_snippet();
untrack(() => snippet(node, args)); untrack(() => snippet(node, ...args));
return () => { return () => {
if (block.d !== null) { if (block.d !== null) {
remove(block.d); remove(block.d);

Loading…
Cancel
Save