File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -46,7 +46,7 @@ export class IntervalTimer {
4646 this . onResume ?.( this . remaining )
4747 this . paused = false
4848 this . callbackStartTime = new Date ( ) . getTime ( )
49- setTimeout ( ( ) => {
49+ this . timerId = setTimeout ( ( ) => {
5050 this . run ( )
5151 } , this . remaining )
5252 }
Original file line number Diff line number Diff line change @@ -45,12 +45,12 @@ export const useCore = ({
4545 const activeIndex = customRound ( offset , ROUNDING_PRECISION )
4646 // if we are at the last index we need to switch to the second one without animation
4747 // second one because the first one is a clone of the last one
48- if ( activeIndex == = paddedChildrenArray . length - 1 ) {
48+ if ( activeIndex > = paddedChildrenArray . length - 1 ) {
4949 goToPage ( 1 )
5050 }
5151 // if we are at the first index we need to switch to the next to last one without animation
5252 // next to last one because the last one is a clone of the first one
53- if ( activeIndex < 0.01 && activeIndex > - 0.01 ) {
53+ if ( activeIndex <= 0.01 ) {
5454 goToPage ( paddedChildrenArray . length - 2 , 0 )
5555 }
5656 } ,
You can’t perform that action at this time.
0 commit comments