Permalink
Browse files

fix small bug in matcher

  • Loading branch information...
1 parent 58b08c5 commit 40614d7b2bfb89c183e6f840a2ea6596c45b2ecc @erwaller erwaller committed Oct 12, 2011
Showing with 2 additions and 0 deletions.
  1. +2 −0 lib/soulmate/matcher.rb
View
@@ -9,6 +9,8 @@ def matches_for_term(term, options = {})
w.size < MIN_COMPLETE or STOP_WORDS.include?(w)
end.sort
+ return [] if words.empty?
+
cachekey = "#{cachebase}:" + words.join('|')
if !options[:cache] || !Soulmate.redis.exists(cachekey)

0 comments on commit 40614d7

Please sign in to comment.