From 1dafe99fa96e13211f9b1be42dd1624656d6d063 Mon Sep 17 00:00:00 2001 From: Yuri Kuznetsov Date: Sat, 5 Apr 2025 17:58:05 +0300 Subject: [PATCH] debounce helper arguments --- client/src/helpers/util/debounce.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/client/src/helpers/util/debounce.js b/client/src/helpers/util/debounce.js index ca609049dc..7a002c858f 100644 --- a/client/src/helpers/util/debounce.js +++ b/client/src/helpers/util/debounce.js @@ -49,7 +49,7 @@ export default class DebounceHelper { /** * @param {{ - * handler: function(), + * handler: function(...*), * interval: number, * }} options * @param options @@ -57,7 +57,7 @@ export default class DebounceHelper { constructor(options) { /** * @private - * @type {function} + * @type {function(...*)} */ this.handler = options.handler; @@ -70,6 +70,8 @@ export default class DebounceHelper { /** * Process. + * + * @param {...*} [arguments] */ process() { const handle = () => { @@ -79,7 +81,7 @@ export default class DebounceHelper { return; } - this.handler(); + this.handler(arguments); this._blocked = true;