Permalink
Browse files

Forgot about default arg score

  • Loading branch information...
1 parent 8bcc90d commit f82eeccf63aea5dac5d26613caad206f37823963 Corey Olsen committed Jul 14, 2011
Showing with 6 additions and 0 deletions.
  1. +6 −0 completer.js
View
@@ -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) {

0 comments on commit f82eecc

Please sign in to comment.