Simplify delayed function in _.debounce.

Former-commit-id: 1f996fc3b6a8954053332739fdc0c2185fb1fd80
This commit is contained in:
John-David Dalton
2013-08-10 21:24:49 -07:00
parent e239ae1aba
commit 4200e2e4e4

View File

@@ -5376,9 +5376,7 @@
var isCalled = trailing && (!leading || callCount > 1); var isCalled = trailing && (!leading || callCount > 1);
clear(); clear();
if (isCalled) { if (isCalled) {
if (maxWait !== false) { lastCalled = +new Date;
lastCalled = +new Date;
}
result = func.apply(thisArg, args); result = func.apply(thisArg, args);
} }
}; };