Merge pull request #2148 from jojosch/fix-2147

commit diff - check if prev_commit is not nil
This commit is contained in:
Valeriy Sizov 2012-12-01 14:02:53 -08:00
commit 1dfbce20d1

View file

@ -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)}