diff options
Diffstat (limited to 'lib/utils.js')
| -rw-r--r-- | lib/utils.js | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/utils.js b/lib/utils.js index 3a355d7b..d6b7bb93 100644 --- a/lib/utils.js +++ b/lib/utils.js @@ -160,7 +160,10 @@ var utils = { }; /* Execute a function with the given value for "this". Equivalent to jQuery.proxy(). */ -Function.prototype.proxy = function(fn, self) { return function() { fn.apply(self, arguments); }; }; +Function.prototype.proxy = function(self) { + var fn = this; + return function() { return fn.apply(self, arguments); }; +}; /* |
