diff --git a/src/lib/motion-start/render/VisualElement.svelte.ts b/src/lib/motion-start/render/VisualElement.svelte.ts index f0044599..a019d387 100644 --- a/src/lib/motion-start/render/VisualElement.svelte.ts +++ b/src/lib/motion-start/render/VisualElement.svelte.ts @@ -420,6 +420,7 @@ export abstract class VisualElement< private bindToMotionValue(key: string, value: MotionValue) { if (this.valueSubscriptions.has(key)) { + // this is to insure it runs on unmount and not during mount of keyed element $effect(() => () => { this.valueSubscriptions.get(key)!(); });