summaryrefslogtreecommitdiff
path: root/lib/banzai/object_renderer.rb
diff options
context:
space:
mode:
authorTiago Botelho <tiagonbotelho@hotmail.com>2017-08-23 17:53:29 +0100
committerTiago Botelho <tiagonbotelho@hotmail.com>2017-09-06 15:35:35 +0100
commit6d8e102c740b75ac9e1d168a84f532f6d9ebaa65 (patch)
tree803818e401c0f99a54c41776c5b8dec2c38fd9c0 /lib/banzai/object_renderer.rb
parentdd7434e398d26e5f4c92f73dce4bcf9b7e47e193 (diff)
downloadgitlab-ce-6d8e102c740b75ac9e1d168a84f532f6d9ebaa65.tar.gz
Adds cacheless render to Banzai object render34509-improves-markdown-rendering-performance-for-commits-list
Diffstat (limited to 'lib/banzai/object_renderer.rb')
-rw-r--r--lib/banzai/object_renderer.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/banzai/object_renderer.rb b/lib/banzai/object_renderer.rb
index 2196a92474c..e40556e869c 100644
--- a/lib/banzai/object_renderer.rb
+++ b/lib/banzai/object_renderer.rb
@@ -38,7 +38,7 @@ module Banzai
objects.each_with_index do |object, index|
redacted_data = redacted[index]
object.__send__("redacted_#{attribute}_html=", redacted_data[:document].to_html.html_safe) # rubocop:disable GitlabSecurity/PublicSend
- object.user_visible_reference_count = redacted_data[:visible_reference_count]
+ object.user_visible_reference_count = redacted_data[:visible_reference_count] if object.respond_to?(:user_visible_reference_count)
end
end