]> git.openstreetmap.org Git - rails.git/blobdiff - app/views/notes/_note.json.jsonify
Fix exception with GPX and RSS notes#index when no notes are found
[rails.git] / app / views / notes / _note.json.jsonify
index 5724dfd540fc0392d101544e2079927c4e358b23..c702d9254b49aa886426887da8faf84fcf5b4b94 100644 (file)
@@ -24,6 +24,10 @@ json.properties do
     end
 
     json.action comment.event
-    json.text comment.body unless comment.body.nil?
+
+    if comment.body
+      json.text comment.body.to_text
+      json.html comment.body.to_html
+    end
   end
 end