about summary refs log tree commit diff
path: root/app/serializers
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2018-02-22 17:42:33 +0100
committerGitHub <noreply@github.com>2018-02-22 17:42:33 +0100
commitb8535ad4df089166f1cae2cf61e55060223a2671 (patch)
tree7f8ace1c1212ca8f8018ab5fba84ad271eb0f465 /app/serializers
parent5f3bee345d0fcebabd90a28ada1fab7cd6e70b0e (diff)
Fix nil error in focal_point? (#6537)
Diffstat (limited to 'app/serializers')
-rw-r--r--app/serializers/activitypub/image_serializer.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/serializers/activitypub/image_serializer.rb b/app/serializers/activitypub/image_serializer.rb
index f8484c87f..3c08f77e8 100644
--- a/app/serializers/activitypub/image_serializer.rb
+++ b/app/serializers/activitypub/image_serializer.rb
@@ -19,7 +19,7 @@ class ActivityPub::ImageSerializer < ActiveModel::Serializer
   end
 
   def focal_point?
-    object.respond_to?(:meta) && object.meta['focus'].is_a?(Hash)
+    object.respond_to?(:meta) && object.meta.is_a?(Hash) && object.meta['focus'].is_a?(Hash)
   end
 
   def focal_point