Commit 5ef7fdbd54ef41de01b64b4df58529d4bf3c62a3
1 parent
9b52affe
Exists in
spb-stable
and in
2 other branches
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 | 116 | added_lines[line_new] = { line_code: line_code, type: type, line: line } |
| 117 | 117 | end |
| 118 | 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 | 121 | offset1 = 0 |
| 122 | 122 | offset2 = 0 | ... | ... |