FIX: title missing from revisions dialog

This commit is contained in:
Régis Hanol 2015-03-02 18:29:59 +01:00
parent 7c14db44cc
commit 05890436df

View file

@ -112,11 +112,11 @@ class PostRevisionSerializer < ApplicationSerializer
end
def title_changes
prev = "<div>#{previous["title"] && CGI::escapeHTML(previous["title"])}</div>"
cur = "<div>#{current["title"] && CGI::escapeHTML(current["title"])}</div>"
return if prev == cur
# always show the title for post_number == 1
return if object.post.post_number > 1 && prev == cur
diff = DiscourseDiff.new(prev, cur)