Skip to content

Commit

Permalink
Remove dead code
Browse files Browse the repository at this point in the history
  • Loading branch information
futpib committed Aug 16, 2022
1 parent 030d595 commit 73f676c
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/index.ts
Expand Up @@ -35,14 +35,10 @@ export default function throttleBatch<A extends any[], B = Array<A[0]>>(f: (batc
} else {
clearTimeout(timeout!);
timeout = setTimeout(() => {
if (batch === undefined) {
return;
}

lastCallTime = Date.now();
const batch_ = batch;
batch = undefined;
f(batch_);
f(batch_!);
}, threshold);
}
};
Expand Down

0 comments on commit 73f676c

Please sign in to comment.