Commit ca42e91e authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Merge pull request #1727 from gitlabhq/fix_bug_wiki

Fix 500 error when project is empty
parents db469ea3 883d138f
...@@ -173,7 +173,7 @@ module Gitlab ...@@ -173,7 +173,7 @@ module Gitlab
end end
def reference_commit(identifier) def reference_commit(identifier)
if commit = @project.commit(identifier) if @project.valid_repo? && commit = @project.commit(identifier)
link_to(identifier, project_commit_path(@project, commit), html_options.merge(title: CommitDecorator.new(commit).link_title, class: "gfm gfm-commit #{html_options[:class]}")) link_to(identifier, project_commit_path(@project, commit), html_options.merge(title: CommitDecorator.new(commit).link_title, class: "gfm gfm-commit #{html_options[:class]}"))
end end
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment