Ensure _.debounce queues a trailing call after maxWait. [closes #2229]

This commit is contained in:
John-David Dalton
2016-04-10 19:53:34 -07:00
parent e619f8ca83
commit e60e97c03f
2 changed files with 26 additions and 0 deletions

View File

@@ -9436,6 +9436,9 @@
timerId = setTimeout(timerExpired, wait);
return invokeFunc(lastCallTime);
}
if (timerId === undefined) {
timerId = setTimeout(timerExpired, wait);
}
return result;
}
debounced.cancel = cancel;