File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change 1
1
import type { Directive , DirectiveBinding , Ref , VNode } from 'vue'
2
2
import defu from 'defu'
3
- import { ref , unref } from 'vue'
3
+ import { ref , toRaw , unref } from 'vue'
4
4
import { motionState } from '../features/state'
5
5
import type { MotionInstance , MotionVariants } from '../types'
6
6
import { useMotion } from '../useMotion'
@@ -21,7 +21,7 @@ export function directive<T extends string>(
21
21
motionState [ key ] . stop ( )
22
22
23
23
// We deep copy presets to prevent global mutation
24
- const variantsObject = isPreset ? structuredClone ( variants || { } ) : variants || { }
24
+ const variantsObject = isPreset ? structuredClone ( toRaw ( variants ) || { } ) : variants || { }
25
25
26
26
// Initialize variants with argument
27
27
const variantsRef = ref ( variantsObject ) as Ref < MotionVariants < T > >
You can’t perform that action at this time.
0 commit comments