diff options
-rw-r--r-- | app/models/note.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/note.rb b/app/models/note.rb index 697c9d03a93..b3b9bd760ee 100644 --- a/app/models/note.rb +++ b/app/models/note.rb @@ -71,7 +71,7 @@ class Note < ActiveRecord::Base end def find_diff - return nil unless noteable.diffs.present? + return nil unless noteable && noteable.diffs.present? @diff ||= noteable.diffs.find do |d| Digest::SHA1.hexdigest(d.new_path) == diff_file_index if d.new_path |