summaryrefslogtreecommitdiff
path: root/app/views/commits
diff options
context:
space:
mode:
authorJohannes Schleifenbaum <johannes@js-webcoding.de>2012-12-01 19:31:39 +0100
committerJohannes Schleifenbaum <johannes@js-webcoding.de>2012-12-01 19:31:39 +0100
commit0323610b72015c274c7292ee69992f75cdcd116c (patch)
tree5b3e3acdb980f1e2757a9cced6048b644d196ed3 /app/views/commits
parente9212b0aa2de2a02e6c7b685f3cb5d7f9d3841f0 (diff)
downloadgitlab-ce-0323610b72015c274c7292ee69992f75cdcd116c.tar.gz
commit diff - check if prev_commit is not nil
Diffstat (limited to 'app/views/commits')
-rw-r--r--app/views/commits/_diffs.html.haml2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/views/commits/_diffs.html.haml b/app/views/commits/_diffs.html.haml
index 53c2319fb38..e7733f0506b 100644
--- a/app/views/commits/_diffs.html.haml
+++ b/app/views/commits/_diffs.html.haml
@@ -43,7 +43,7 @@
- if file.text?
= render "commits/text_file", diff: diff, index: i
- elsif file.image?
- - old_file = (@commit.prev_commit.tree / diff.old_path)
+ - old_file = (@commit.prev_commit.tree / diff.old_path) if !@commit.prev_commit.nil?
- if diff.renamed_file || diff.new_file || diff.deleted_file
.diff_file_content_image
.image{class: image_diff_class(diff)}