Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Forgot about default arg score

  • Loading branch information...
commit f82eeccf63aea5dac5d26613caad206f37823963 1 parent 8bcc90d
Corey Olsen authored
Showing with 6 additions and 0 deletions.
  1. +6 −0 completer.js
View
6 completer.js
@@ -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) {
Please sign in to comment.
Something went wrong with that request. Please try again.