summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorValeriy Sizov <vsv2711@gmail.com>2012-12-01 14:02:53 -0800
committerValeriy Sizov <vsv2711@gmail.com>2012-12-01 14:02:53 -0800
commit1dfbce20d18887402edfc8458705f9c6cbcd0c61 (patch)
tree5b3e3acdb980f1e2757a9cced6048b644d196ed3
parente9212b0aa2de2a02e6c7b685f3cb5d7f9d3841f0 (diff)
parent0323610b72015c274c7292ee69992f75cdcd116c (diff)
downloadgitlab-ce-1dfbce20d18887402edfc8458705f9c6cbcd0c61.tar.gz
Merge pull request #2148 from jojosch/fix-2147
commit diff - check if prev_commit is not nil
-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)}