0
0
Fork 0

Ignore empty response in ActivityPub::FetchRemoteStatusService (#4661)

* Ignore empty response in ActivityPub::FetchRemoteStatusService

This fixes `NoMethodError: undefined method `[]' for nil:NilClass` error.

* Check json.nil? in JsonLdHelper#supported_context?
This commit is contained in:
unarist 2017-08-23 03:00:49 +09:00 committed by Eugen Rochko
parent 871c0d251a
commit 5927b43c0f
2 changed files with 2 additions and 2 deletions

View file

@ -14,7 +14,7 @@ module JsonLdHelper
end
def supported_context?(json)
equals_or_includes?(json['@context'], ActivityPub::TagManager::CONTEXT)
!json.nil? && equals_or_includes?(json['@context'], ActivityPub::TagManager::CONTEXT)
end
def fetch_resource(uri)