Update builds & docs.

This commit is contained in:
John-David Dalton
2013-11-05 23:54:03 -08:00
parent bd3034819e
commit a8196ec99e
7 changed files with 66 additions and 45 deletions

View File

@@ -3866,7 +3866,9 @@
if (isCalled) {
lastCalled = now();
result = func.apply(thisArg, args);
args = thisArg = null;
if (!timeoutId && !maxTimeoutId) {
args = thisArg = null;
}
}
} else {
timeoutId = setTimeout(delayed, remaining);
@@ -3881,7 +3883,9 @@
if (trailing || (maxWait !== wait)) {
lastCalled = now();
result = func.apply(thisArg, args);
args = thisArg = null;
if (!timeoutId && !maxTimeoutId) {
args = thisArg = null;
}
}
};
@@ -3906,7 +3910,6 @@
}
lastCalled = stamp;
result = func.apply(thisArg, args);
args = thisArg = null;
}
else if (!maxTimeoutId) {
maxTimeoutId = setTimeout(maxDelayed, remaining);
@@ -3919,8 +3922,12 @@
timeoutId = setTimeout(delayed, wait);
}
if (leadingCall) {
isCalled = true;
result = func.apply(thisArg, args);
}
if (isCalled && !timeoutId && !maxTimeoutId) {
args = thisArg = null;
}
return result;
};
}