Skip to content

Commit

Permalink
fix(transitiondelay): setTimeout is not done if transitionDelay equal…
Browse files Browse the repository at this point in the history
…s -1
  • Loading branch information
CamilleFljt committed Oct 4, 2023
1 parent 82c21ee commit 5b0701f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/hooks/useButtonAnimation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const useButtonAnimation = (iterateValues: number[], transitionDelay: number): P
if (iterateValues.length !== 0) {
if (!iterateValues.includes(current) && update) setCurrent(iterateValues[0])
timeout = setTimeout(() => {
if (update && isMounted) {
if (update && isMounted && transitionDelay !== -1) {
setCurrent(
iterateValues[
iterateValues.includes(current)
Expand Down

0 comments on commit 5b0701f

Please sign in to comment.