Skip to content

Commit

Permalink
Revert "No need to check if repository_ref is present"
Browse files Browse the repository at this point in the history
  • Loading branch information
jvanbaarsen committed Jun 9, 2015
1 parent 9562f02 commit 25a870a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/gitlab/project_search_results.rb
Expand Up @@ -4,7 +4,11 @@ class ProjectSearchResults < SearchResults

def initialize(project_id, query, repository_ref = nil)
@project = Project.find(project_id)
@repository_ref = repository_ref
@repository_ref = if repository_ref.present?
repository_ref
else
nil
end
@query = Shellwords.shellescape(query) if query.present?
end

Expand Down

0 comments on commit 25a870a

Please sign in to comment.