Skip to content

Commit

Permalink
remove context support from debounce
Browse files Browse the repository at this point in the history
  • Loading branch information
GooseOb committed Jan 6, 2025
1 parent a939534 commit 0d0545b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "yt-defaulter",
"author": "GooseOb",
"version": "1.11.18",
"version": "1.11.19",
"repository": {
"type": "git",
"url": "git+https://github.com/GooseOb/YT-Defaulter.git"
Expand Down
4 changes: 2 additions & 2 deletions src/utils/debounce.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ export const debounce = <TParams extends any[]>(
delay: number
): ((...args: TParams) => void) => {
let timeout: number;
return function (...args) {
return (...args) => {
clearTimeout(timeout);
timeout = window.setTimeout(() => {
callback.apply(this, args);
callback(...args);
}, delay);
};
};

0 comments on commit 0d0545b

Please sign in to comment.