From 0d0545bb107ccafd619718c9e20ffcffefde5d3c Mon Sep 17 00:00:00 2001 From: GooseOb Date: Mon, 6 Jan 2025 19:21:23 +0100 Subject: [PATCH] remove context support from debounce --- package.json | 2 +- src/utils/debounce.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 33e8e63..4faa8e8 100644 --- a/package.json +++ b/package.json @@ -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" diff --git a/src/utils/debounce.ts b/src/utils/debounce.ts index 6f490da..2bfa93b 100644 --- a/src/utils/debounce.ts +++ b/src/utils/debounce.ts @@ -3,10 +3,10 @@ export const debounce = ( 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); }; };