From 1b65c36743f527254c7784b66c642bc06893d90d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ram=C3=B3n=20Souza?= Date: Wed, 1 Nov 2023 11:12:15 -0300 Subject: [PATCH] improve throttle function --- bigbluebutton-html5/imports/utils/throttle.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bigbluebutton-html5/imports/utils/throttle.js b/bigbluebutton-html5/imports/utils/throttle.js index 0eaead6847..0ec52ed054 100644 --- a/bigbluebutton-html5/imports/utils/throttle.js +++ b/bigbluebutton-html5/imports/utils/throttle.js @@ -22,7 +22,7 @@ export function throttle(func, delay, options = {}) { if (leadingExec && leading) { execute(); leadingExec = false; - const nextExecDelay = elapsed < delay ? delay - elapsed : 0; + const nextExecDelay = elapsed < delay ? delay - elapsed : delay; setTimeout(function () { leadingExec = true; }, nextExecDelay);