diff options
Diffstat (limited to 'lib/completion.js')
| -rw-r--r-- | lib/completion.js | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/completion.js b/lib/completion.js index 7e4bcf57..14c2dbe4 100644 --- a/lib/completion.js +++ b/lib/completion.js @@ -50,8 +50,7 @@ var completion = (function() { }, filter: function(query, callback) { - var self = this; - var handler = function(results) { callback(self.processResults(query, results)); } + var handler = function(results) { callback(this.processResults(query, results)); }.proxy(this); // are the results ready? if (this.completions !== null) { @@ -61,9 +60,9 @@ var completion = (function() { // no: register the handler as a callback this.resultsReady = function(results) { handler(results); - self.resultsReady = self.fallbackReadyCallback; - self.resultsReady(results); - } + this.resultsReady = this.fallbackReadyCallback; + this.resultsReady(results); + }.proxy(this); } } }); |
