Commit 1dfbce20 authored by Valeriy Sizov's avatar Valeriy Sizov

Merge pull request #2148 from jojosch/fix-2147

commit diff - check if prev_commit is not nil
parents e9212b0a 0323610b
...@@ -43,7 +43,7 @@ ...@@ -43,7 +43,7 @@
- if file.text? - if file.text?
= render "commits/text_file", diff: diff, index: i = render "commits/text_file", diff: diff, index: i
- elsif file.image? - 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 - if diff.renamed_file || diff.new_file || diff.deleted_file
.diff_file_content_image .diff_file_content_image
.image{class: image_diff_class(diff)} .image{class: image_diff_class(diff)}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment