mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-23 23:58:31 -05:00
don't fail serializing if title is missing
This commit is contained in:
parent
71d6266f98
commit
6a20d12772
1 changed files with 4 additions and 2 deletions
|
@ -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 a new issue