diff --git a/app/serializers/post_revision_serializer.rb b/app/serializers/post_revision_serializer.rb index 0565a1a0032..1f8c07adf58 100644 --- a/app/serializers/post_revision_serializer.rb +++ b/app/serializers/post_revision_serializer.rb @@ -112,8 +112,10 @@ class PostRevisionSerializer < ApplicationSerializer end def title_changes - prev = "
#{CGI::escapeHTML(previous["title"])}
" - cur = "
#{CGI::escapeHTML(current["title"])}
" + + prev = "
#{previous["title"] && CGI::escapeHTML(previous["title"])}
" + cur = "
#{current["title"] && CGI::escapeHTML(current["title"])}
" + return if prev == cur diff = DiscourseDiff.new(prev, cur)