Skip to content

Commit 20101ff

Browse files
committed
debounce: invokeAsap param should`t prevent trailing calling.
1 parent 8f4d6d5 commit 20101ff

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/jquery.debounce/jquery.debounce.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ $.extend({
3838
clearTimeout(timer);
3939

4040
timer = setTimeout(function() {
41-
invokeAsap || fn.apply(ctx, args);
41+
fn.apply(ctx, args);
4242
timer = null;
4343
}, timeout);
4444

src/jquery.debounce/jquery.debounce.min.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@
66
* http://www.opensource.org/licenses/mit-license.php
77
* http://www.gnu.org/licenses/gpl.html
88
*
9-
*/(function(a){a.extend({debounce:function(a,b,c,d){arguments.length==3&&typeof c!="boolean"&&(d=c,c=!1);var e;return function(){var f=arguments;d=d||this,c&&!e&&a.apply(d,f),clearTimeout(e),e=setTimeout(function(){c||a.apply(d,f),e=null},b)}},throttle:function(a,b,c){var d,e,f;return function(){e=arguments,f=!0,c=c||this,d||function(){f?(a.apply(c,e),f=!1,d=setTimeout(arguments.callee,b)):d=null}()}}})})(jQuery);
9+
*/(function(a){a.extend({debounce:function(a,b,c,d){arguments.length==3&&typeof c!="boolean"&&(d=c,c=!1);var e;return function(){var f=arguments;d=d||this,c&&!e&&a.apply(d,f),clearTimeout(e),e=setTimeout(function(){a.apply(d,f),e=null},b)}},throttle:function(a,b,c){var d,e,f;return function(){e=arguments,f=!0,c=c||this,d||function(){f?(a.apply(c,e),f=!1,d=setTimeout(arguments.callee,b)):d=null}()}}})})(jQuery);

0 commit comments

Comments
 (0)