]> cat aescling's git repositories - mastodon.git/commitdiff
Fix a bear check when the activity object is nil (#14981)
authorTakeshi Umeda <noel.yoshiba@gmail.com>
Tue, 13 Oct 2020 20:41:00 +0000 (05:41 +0900)
committerGitHub <noreply@github.com>
Tue, 13 Oct 2020 20:41:00 +0000 (22:41 +0200)
app/lib/activitypub/activity.rb

index 224451f41737bf68063af1aa4f5e9a47574177c2..2b5d3ffc29c7a0379ad1d7cb2925562d47d5d0db 100644 (file)
@@ -74,7 +74,7 @@ class ActivityPub::Activity
     @object_uri ||= begin
       str = value_or_id(@object)
 
-      if str.start_with?('bear:')
+      if str&.start_with?('bear:')
         Addressable::URI.parse(str).query_values['u']
       else
         str