mirror of
https://github.com/discourse/discourse.git
synced 2024-11-25 10:20:58 -06:00
don't fail serializing if title is missing
This commit is contained in:
parent
71d6266f98
commit
6a20d12772
@ -112,8 +112,10 @@ class PostRevisionSerializer < ApplicationSerializer
|
||||
end
|
||||
|
||||
def title_changes
|
||||
prev = "<div>#{CGI::escapeHTML(previous["title"])}</div>"
|
||||
cur = "<div>#{CGI::escapeHTML(current["title"])}</div>"
|
||||
|
||||
prev = "<div>#{previous["title"] && CGI::escapeHTML(previous["title"])}</div>"
|
||||
cur = "<div>#{current["title"] && CGI::escapeHTML(current["title"])}</div>"
|
||||
|
||||
return if prev == cur
|
||||
|
||||
diff = DiscourseDiff.new(prev, cur)
|
||||
|
Loading…
Reference in New Issue
Block a user