diff --git a/packages/bits-ui/src/lib/bits/accordion/accordion.svelte.ts b/packages/bits-ui/src/lib/bits/accordion/accordion.svelte.ts index 0dcb2aba5..5fe896f6a 100644 --- a/packages/bits-ui/src/lib/bits/accordion/accordion.svelte.ts +++ b/packages/bits-ui/src/lib/bits/accordion/accordion.svelte.ts @@ -315,7 +315,9 @@ class AccordionContentState { }); }); - $effect(() => { + $effect.pre(() => { + // eslint-disable-next-line no-unused-expressions + this.item.isSelected; const node = this.presentEl.value; if (!node) return; @@ -337,8 +339,6 @@ class AccordionContentState { if (!this.isMountAnimationPrevented.value) { const transitionDuration = this.currentStyle.value.transitionDuration; const animationName = this.currentStyle.value.animationName; - console.log("transitionDuration", transitionDuration); - console.log("animationName", animationName); if (transitionDuration) { node.style.transitionDuration = transitionDuration; } diff --git a/packages/bits-ui/src/lib/bits/accordion/components/accordion-content.svelte b/packages/bits-ui/src/lib/bits/accordion/components/accordion-content.svelte index 45dd0b505..5eb123b30 100644 --- a/packages/bits-ui/src/lib/bits/accordion/components/accordion-content.svelte +++ b/packages/bits-ui/src/lib/bits/accordion/components/accordion-content.svelte @@ -32,10 +32,12 @@ {#if asChild} {@render child?.({ props: { ...mergedProps, hidden: !present.value } })} {:else} + +