Skip to content

Commit

Permalink
Forgot about default arg score
Browse files Browse the repository at this point in the history
  • Loading branch information
Corey Olsen committed Jul 14, 2011
1 parent 8bcc90d commit f82eecc
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions completer.js
Expand Up @@ -25,6 +25,12 @@ exports.counter = 0;
exports.addCompletions = addCompletions = function (phrase, id, score, cb) {
// Add completions for originalText to the completions trie.
// Store the original text, prefixed by the optional 'key'

if (typeof score === 'function') {
cb = score;
score = null;
}


var text = phrase.trim().toLowerCase();
if (! text) {
Expand Down

0 comments on commit f82eecc

Please sign in to comment.