Commit 5ef7fdbd54ef41de01b64b4df58529d4bf3c62a3

Authored by George Dewar
1 parent 9b52affe

Fix bug in which a line count without empty lines was incorrectly used

Showing 1 changed file with 1 additions and 1 deletions   Show diff stats
app/helpers/commits_helper.rb
@@ -116,7 +116,7 @@ module CommitsHelper @@ -116,7 +116,7 @@ module CommitsHelper
116 added_lines[line_new] = { line_code: line_code, type: type, line: line } 116 added_lines[line_new] = { line_code: line_code, type: type, line: line }
117 end 117 end
118 end 118 end
119 - max_length = old_file ? old_file.sloc + added_lines.length : file.sloc 119 + max_length = old_file ? [old_file.loc, file.loc].max : file.loc
120 120
121 offset1 = 0 121 offset1 = 0
122 offset2 = 0 122 offset2 = 0