From 5b20c57acfa60b8c500fc1f450c2836cfefd0fde Mon Sep 17 00:00:00 2001 From: Piotr Monwid-Olechnowicz Date: Fri, 10 Dec 2021 17:27:20 +0100 Subject: [PATCH] Fix debounce time `wait: number` is unused, and instead the timeout ID is passed to `setTimeout`. I guess this wasn't intentional. --- extensions/github1s/src/helpers/func.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/github1s/src/helpers/func.ts b/extensions/github1s/src/helpers/func.ts index d60eeda2e..ca0ffca5d 100644 --- a/extensions/github1s/src/helpers/func.ts +++ b/extensions/github1s/src/helpers/func.ts @@ -49,7 +49,7 @@ export const debounce = any>( let timer = null; return function (...args: Parameters): void { timer && clearTimeout(timer); - timer = setTimeout(() => func.call(this, ...args), timer); + timer = setTimeout(() => func.call(this, ...args), wait); }; };