Skip to content

Commit d198864

Browse files
committed
Fixed wrong logic in fallback of commit method in useAnimations
1 parent 6055ef2 commit d198864

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/hooks/useAnimations.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import {
44
isArray,
55
isSameObject,
66
isSameObjectArray,
7+
toArray,
78
uniqBy,
89
} from "../utils";
910
import {
@@ -106,7 +107,7 @@ export const useAnimations = <ID extends string>(
106107
handle._commit(
107108
getAnimation(name),
108109
getTarget()!,
109-
uniqBy(getKeys(getKeyframesAndOptions(name)[0]))
110+
uniqBy(getKeys(toArray(getKeyframesAndOptions(name)[0])))
110111
);
111112
return externalHandle;
112113
},

0 commit comments

Comments
 (0)