diff --git a/src/helpers/helpers.extras.ts b/src/helpers/helpers.extras.ts index 162103f85f1..754f6050483 100644 --- a/src/helpers/helpers.extras.ts +++ b/src/helpers/helpers.extras.ts @@ -27,14 +27,17 @@ export function throttled>( fn: (...args: TArgs) => void, thisArg: any, ) { + let argsToUse = [] as TArgs; let ticking = false; return function(...args: TArgs) { + // Save the args for use later + argsToUse = args; if (!ticking) { ticking = true; requestAnimFrame.call(window, () => { ticking = false; - fn.apply(thisArg, args); + fn.apply(thisArg, argsToUse); }); } };