[Pkg-javascript-commits] [dojo] 22/149: fixes #18296, Fix context binding within debounce and throttle

David Prévot taffit at moszumanska.debian.org
Sat Feb 27 03:13:43 UTC 2016


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository dojo.

commit 04101daeee036eaac51c5a365fb8c685343e420d
Author: Mangala SSS Khalsa <mkhalsa at sitepen.com>
Date:   Sun Oct 5 18:05:28 2014 -0700

    fixes #18296, Fix context binding within debounce and throttle
---
 debounce.js | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/debounce.js b/debounce.js
index 70e4317..ef561e2 100644
--- a/debounce.js
+++ b/debounce.js
@@ -21,9 +21,10 @@ define([], function(){
 			if(timer){
 				clearTimeout(timer);
 			}
+			var self = this;
 			var a = arguments;
 			timer = setTimeout(function(){
-				cb.apply(this, a);
+				cb.apply(self, a);
 			}, wait);
 		};
 	};

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/dojo.git



More information about the Pkg-javascript-commits mailing list