Skip to content

Commit

Permalink
Merge pull request #229 from QuiiBz/refactor/duplicated-code
Browse files Browse the repository at this point in the history
  • Loading branch information
aidenybai committed Aug 1, 2022
2 parents bc51758 + 357cd84 commit 35d51e1
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions packages/million/scheduler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,7 @@ export const batch = (
return (_callback: () => any) => {
callback = _callback;
if (!timer) {
timer = requestAnimationFrame(() => {
force = limit || Infinity;
timer = 0;
callback();
});
timer = requestAnimationFrame(invoke);
}
if (--force < 0) stop(true);
return stop;
Expand Down

0 comments on commit 35d51e1

Please sign in to comment.