diff options
author | Valery Sizov <valery@gitlab.com> | 2016-12-02 15:03:30 +0300 |
---|---|---|
committer | Valery Sizov <valery@gitlab.com> | 2016-12-02 15:03:30 +0300 |
commit | f5d7a61760d8f60c27b8838db826468768154733 (patch) | |
tree | a582ecc1788ace878cdbc1467c91dd4c654b41e0 /lib/gitlab/diff/file_collection | |
parent | 2394afe4304626130ee70ec095b9d9b399868969 (diff) |
Fixes ActionView::Template::Error: undefined method `text?` for nil:NilClass
Diffstat (limited to 'lib/gitlab/diff/file_collection')
-rw-r--r-- | lib/gitlab/diff/file_collection/merge_request_diff.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/gitlab/diff/file_collection/merge_request_diff.rb b/lib/gitlab/diff/file_collection/merge_request_diff.rb index 26bb0bc16f5..56530448f36 100644 --- a/lib/gitlab/diff/file_collection/merge_request_diff.rb +++ b/lib/gitlab/diff/file_collection/merge_request_diff.rb @@ -61,7 +61,7 @@ module Gitlab end def cacheable?(diff_file) - @merge_request_diff.present? && diff_file.blob.text? + @merge_request_diff.present? && diff_file.blob && diff_file.blob.text? end def cache_key |