Skip to content

Commit 77e7eea

Browse files
authored
fix: move createSingleSelectionContext(multiple) out of the $effect() and call it synchronously during component initialization (#1878)
1 parent 8e360bf commit 77e7eea

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/lib/accordion/Accordion.svelte

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,8 @@
2929
// Set context during initialization
3030
setAccordionContext(reactiveCtx);
3131
32-
$effect(() => {
33-
createSingleSelectionContext(multiple);
34-
});
32+
// Create selection context synchronously for proper nesting
33+
createSingleSelectionContext(multiple);
3534
3635
const base = $derived(accordion({ flush, class: clsx(theme, className) }));
3736
</script>

0 commit comments

Comments
 (0)