Fix nil error in focal_point? (#6537)

lolsob-rspec
Eugen Rochko 2018-02-22 17:42:33 +01:00 committed by GitHub
parent 51e1e65c84
commit 692dfd9a93
1 changed files with 1 additions and 1 deletions

View File

@ -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