diff options
Diffstat (limited to 'app/views/search/results/_blob.html.haml')
-rw-r--r-- | app/views/search/results/_blob.html.haml | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/app/views/search/results/_blob.html.haml b/app/views/search/results/_blob.html.haml index 3681f823ef5..115bb6cc9fa 100644 --- a/app/views/search/results/_blob.html.haml +++ b/app/views/search/results/_blob.html.haml @@ -1,6 +1,8 @@ - project = blob.project - return unless project -- blob_link = project_blob_path(project, tree_join(repository_ref(project), blob.path)) -- blame_link = project_blame_path(project, tree_join(repository_ref(project), blob.path)) +- project_repository_ref = repository_ref(project) || '' +- blob_path = blob.path || '' +- blob_link = project_blob_path(project, tree_join(project_repository_ref, blob_path)) +- blame_link = project_blame_path(project, tree_join(project_repository_ref, blob_path)) -= render partial: 'search/results/blob_data', locals: { blob: blob, project: project, path: blob.path, blob_link: blob_link, blame_link: blame_link } += render partial: 'search/results/blob_data', locals: { blob: blob, project: project, path: blob_path, blob_link: blob_link, blame_link: blame_link } |