Skip to content
Browse files

Fail-safe JournalDetails rendering.

Let's not crash even when running on an older Redmine.
  • Loading branch information...
1 parent b51240d commit 29081b27d3eea50dd42d3d0a98c9f9a8d88b48c4 @mutru mutru committed May 23, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/flowdock_renderer.rb
View
4 lib/flowdock_renderer.rb
@@ -11,10 +11,10 @@ def notes_to_html(journal)
end
def details_to_html(journal)
- if journal && journal.details && journal.details.size > 0
+ begin
html_list = journal_details(journal.details).map { |detail| "<li>#{detail}</li>" }
"<ul>#{html_list.join}</ul>"
- else
+ rescue => ex
""
end
end

0 comments on commit 29081b2

Please sign in to comment.
Something went wrong with that request. Please try again.