FIX: Use #dup instead of #+@ since content could be an instance of Nokogiri::XML::Element.

FIX: Use #dup instead of #+@ since content could be an instance of Nokogiri::XML::Element.

diff --git a/app/models/topic_embed.rb b/app/models/topic_embed.rb
index 973b489..8219e30 100644
--- a/app/models/topic_embed.rb
+++ b/app/models/topic_embed.rb
@@ -37,7 +37,7 @@ class TopicEmbed < ActiveRecord::Base
       contents = first_paragraph_from(contents)
     end
     contents ||= ''
-    contents = +contents << imported_from_html(url)
+    contents = contents.dup << imported_from_html(url)
 
     url = normalize_url(url)

GitHub sha: 50afe593

1 Like

Revert "FIX: Use #dup instead of #+@ since content could be an instance of Nokogiri::XML::Element."