Permalink
Browse files

viewer: check for params[:q] existence.

  • Loading branch information...
1 parent abfc245 commit d413e5b74a733775cb1c65fbfca2b5fa17d3d35f @whitequark committed Oct 5, 2013
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/irclogger/viewer.rb
View
@@ -46,7 +46,7 @@ class Viewer < Sinatra::Base
@channel = channel_unescape(params[:channel])
@limit = 300
- if params[:q].length >= 3
+ if params[:q] && params[:q].length >= 3
@messages = Message.search_in_channel(@channel, params[:q])
@message_count = @messages.count

0 comments on commit d413e5b

Please sign in to comment.