Check postInfo exists

This commit is contained in:
David Taylor 2017-03-08 15:47:18 +00:00
parent 8b03c459f8
commit f66da5be15
1 changed files with 5 additions and 5 deletions

View File

@ -235,11 +235,11 @@ SQL
.joins(:user)
.pluck('post_number', 'username', 'cooked')
.first
postInfo[2] = PrettyText.excerpt(postInfo[2], SiteSetting.solved_quote_length)
return postInfo
if postInfo
postInfo[2] = PrettyText.excerpt(postInfo[2], SiteSetting.solved_quote_length)
return postInfo
end
end
def accepted_answer_post_id