summaryrefslogtreecommitdiff
path: root/app/models/legacy_diff_note.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/legacy_diff_note.rb')
-rw-r--r--app/models/legacy_diff_note.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/models/legacy_diff_note.rb b/app/models/legacy_diff_note.rb
index 790dfd4d480..04a651d50ab 100644
--- a/app/models/legacy_diff_note.rb
+++ b/app/models/legacy_diff_note.rb
@@ -38,7 +38,7 @@ class LegacyDiffNote < Note
end
def diff_line
- @diff_line ||= diff_file.line_for_line_code(self.line_code)
+ @diff_line ||= diff_file.line_for_line_code(self.line_code) if diff_file
end
def for_line?(line)
@@ -55,7 +55,7 @@ class LegacyDiffNote < Note
def active?
return @active if defined?(@active)
return true if for_commit?
- return true unless self.diff
+ return true unless diff_line
return false unless noteable
noteable_diff = find_noteable_diff