Commit 1dfbce20d18887402edfc8458705f9c6cbcd0c61
Exists in
master
and in
4 other branches
Merge pull request #2148 from jojosch/fix-2147
commit diff - check if prev_commit is not nil
Showing
1 changed file
with
1 additions
and
1 deletions
Show diff stats
app/views/commits/_diffs.html.haml
... | ... | @@ -43,7 +43,7 @@ |
43 | 43 | - if file.text? |
44 | 44 | = render "commits/text_file", diff: diff, index: i |
45 | 45 | - elsif file.image? |
46 | - - old_file = (@commit.prev_commit.tree / diff.old_path) | |
46 | + - old_file = (@commit.prev_commit.tree / diff.old_path) if !@commit.prev_commit.nil? | |
47 | 47 | - if diff.renamed_file || diff.new_file || diff.deleted_file |
48 | 48 | .diff_file_content_image |
49 | 49 | .image{class: image_diff_class(diff)} | ... | ... |