File tree 3 files changed +4
-8
lines changed
3 files changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -74,7 +74,7 @@ export const createHandle = () => {
74
74
_commit : (
75
75
animation : Animation | undefined ,
76
76
el : HTMLElement ,
77
- keys : string [ ]
77
+ getKeys : ( ) => string [ ]
78
78
) => {
79
79
if ( ! animation ) return ;
80
80
if ( animation . commitStyles ) {
@@ -83,7 +83,7 @@ export const createHandle = () => {
83
83
}
84
84
// Fallback for commitStyles
85
85
const computedStyle = getComputedStyle ( el ) ;
86
- keys . forEach ( ( k ) => {
86
+ getKeys ( ) . forEach ( ( k ) => {
87
87
( el . style as any ) [ k ] = ( computedStyle as any ) [ k ] ;
88
88
} ) ;
89
89
} ,
Original file line number Diff line number Diff line change @@ -96,9 +96,7 @@ export const useAnimation = (
96
96
return externalHandle ;
97
97
} ,
98
98
commit : ( ) => {
99
- handle . _commit (
100
- getAnimation ( ) ,
101
- getTarget ( ) ! ,
99
+ handle . _commit ( getAnimation ( ) , getTarget ( ) ! , ( ) =>
102
100
getKeyframeKeys ( getKeyframes ( ) )
103
101
) ;
104
102
return externalHandle ;
Original file line number Diff line number Diff line change @@ -98,9 +98,7 @@ export const useAnimations = <ID extends string>(
98
98
return externalHandle ;
99
99
} ,
100
100
commit : ( name ) => {
101
- handle . _commit (
102
- getAnimation ( name ) ,
103
- getTarget ( ) ! ,
101
+ handle . _commit ( getAnimation ( name ) , getTarget ( ) ! , ( ) =>
104
102
getKeyframeKeys ( toArray ( getKeyframesAndOptions ( name ) [ 0 ] ) )
105
103
) ;
106
104
return externalHandle ;
You can’t perform that action at this time.
0 commit comments