Ensure _.throttle clears the timeout when func is called. [closes #86]

Former-commit-id: 6f3b777aa247f059d97f965c02323d4ee6ab8464
This commit is contained in:
John-David Dalton
2012-10-09 02:11:41 -07:00
parent db3b429784
commit fd790566b2
2 changed files with 26 additions and 0 deletions

View File

@@ -3468,6 +3468,7 @@
thisArg = this;
if (remain <= 0) {
clearTimeout(timeoutId);
lastCalled = now;
result = func.apply(thisArg, args);
}