Posted on Oct 23, 2014 by
Helpful Elephant
What steps will reproduce the problem? 1. Use a use strict mode 2. Use the throttle function 3. Open console
What is the expected output? What do you see instead? No error. I see an error.
What version of the product are you using? On what operating system? Last verison
Please provide any additional information below. To avoid the problem and keep a use strict mode, give a name to the function :
if(!timer) {
(function handleThrottle() { // HERE
if(needInvoke) {
fn.apply(ctx, args);
needInvoke = false;
timer = setTimeout(handleThrottle, timeout); //And call its name here
}
else {
timer = null;
}
})();
}
Status: New
Labels:
Type-Defect
Priority-Medium