From 3b67af697ce246d1938c571090342c9aa0d9c247 Mon Sep 17 00:00:00 2001 From: Mike Greiling Date: Wed, 25 Jan 2017 14:22:29 -0600 Subject: [PATCH] fix build failures --- app/views/projects/diffs/_content.html.haml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/views/projects/diffs/_content.html.haml b/app/views/projects/diffs/_content.html.haml index f805bfdcaa2..5c38b5ad9c0 100644 --- a/app/views/projects/diffs/_content.html.haml +++ b/app/views/projects/diffs/_content.html.haml @@ -15,7 +15,9 @@ %a.click-to-expand Click to expand it. - elsif diff_file.diff_lines.length > 0 - - total_lines = blob.lines.last.chomp == '' ? blob.lines.size - 1 : blob.lines.size + - total_lines = 0 + - if blob.lines.any? + - total_lines = blob.lines.last.chomp == '' ? blob.lines.size - 1 : blob.lines.size - if diff_view == :parallel = render "projects/diffs/parallel_view", diff_file: diff_file, total_lines: total_lines - else