Skip to content

Commit

Permalink
Need to save the ID of RAF.
Browse files Browse the repository at this point in the history
  • Loading branch information
NaotoshiFujita committed Sep 20, 2022
1 parent cf27e4f commit bfb52d5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/js/constructors/RequestInterval/RequestInterval.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ export function RequestInterval(
}
}

raf( update );
id = raf( update );
}
}

Expand All @@ -85,10 +85,10 @@ export function RequestInterval(
* @param resume - Optional. Whether to resume the paused progress or not.
*/
function start( resume?: boolean ): void {
! resume && cancel();
resume || cancel();
startTime = now() - ( resume ? rate * interval : 0 );
paused = false;
raf( update );
id = raf( update );
}

/**
Expand Down

0 comments on commit bfb52d5

Please sign in to comment.