Commit 0323610b72015c274c7292ee69992f75cdcd116c
1 parent
e9212b0a
Exists in
master
and in
4 other branches
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,7 +43,7 @@ | ||
43 | - if file.text? | 43 | - if file.text? |
44 | = render "commits/text_file", diff: diff, index: i | 44 | = render "commits/text_file", diff: diff, index: i |
45 | - elsif file.image? | 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 | - if diff.renamed_file || diff.new_file || diff.deleted_file | 47 | - if diff.renamed_file || diff.new_file || diff.deleted_file |
48 | .diff_file_content_image | 48 | .diff_file_content_image |
49 | .image{class: image_diff_class(diff)} | 49 | .image{class: image_diff_class(diff)} |