]> cat aescling's git repositories - mastodon.git/commitdiff
Fix nil#object_type error
authorEugen Rochko <eugen@zeonfederated.com>
Fri, 7 Apr 2017 11:05:34 +0000 (13:05 +0200)
committerEugen Rochko <eugen@zeonfederated.com>
Fri, 7 Apr 2017 11:05:34 +0000 (13:05 +0200)
app/lib/atom_serializer.rb

index 4ce0f45135082351fcf3dd0530ae1331ca1e684e..be1cced8b03d702c92fdb832c162d00e1b6ee1d4 100644 (file)
@@ -101,7 +101,7 @@ class AtomSerializer
     serialize_status_attributes(object, status)
 
     append_element(object, 'link', nil, rel: :alternate, type: 'text/html', href: TagManager.instance.url_for(status))
-    append_element(object, 'thr:in-reply-to', nil, ref: TagManager.instance.uri_for(status.thread), href: TagManager.instance.url_for(status.thread)) if status.reply?
+    append_element(object, 'thr:in-reply-to', nil, ref: TagManager.instance.uri_for(status.thread), href: TagManager.instance.url_for(status.thread)) if status.reply? && !status.thread.nil?
 
     object
   end