From 0323610b72015c274c7292ee69992f75cdcd116c Mon Sep 17 00:00:00 2001 From: Johannes Schleifenbaum Date: Sat, 1 Dec 2012 19:31:39 +0100 Subject: [PATCH] commit diff - check if prev_commit is not nil --- app/views/commits/_diffs.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/commits/_diffs.html.haml b/app/views/commits/_diffs.html.haml index 53c2319f..e7733f05 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)}