X-Git-Url: https://yaffs.net/gitweb/?a=blobdiff_plain;f=web%2Fcore%2Fmisc%2Fdebounce.es6.js;h=2defb4514f14957ca52c49c0ef6eb4262cf4b070;hb=f8fc16ae6b862bef59baaad5d051dd37b7ff11b2;hp=56ba0db681608ce0ece8be4211932fd25a6d5c82;hpb=9917807b03b64faf00f6a1f29dcb6eafc454efa5;p=yaffs-website diff --git a/web/core/misc/debounce.es6.js b/web/core/misc/debounce.es6.js index 56ba0db68..2defb4514 100644 --- a/web/core/misc/debounce.es6.js +++ b/web/core/misc/debounce.es6.js @@ -26,13 +26,12 @@ * @return {function} * The debounced function. */ -Drupal.debounce = function (func, wait, immediate) { +Drupal.debounce = function(func, wait, immediate) { let timeout; let result; - return function () { + return function(...args) { const context = this; - const args = arguments; - const later = function () { + const later = function() { timeout = null; if (!immediate) { result = func.apply(context, args);