diff --git a/app/services/activitypub/process_poll_service.rb b/app/services/activitypub/process_poll_service.rb index cb4a0d460..903b6a78a 100644 --- a/app/services/activitypub/process_poll_service.rb +++ b/app/services/activitypub/process_poll_service.rb @@ -30,7 +30,7 @@ class ActivityPub::ProcessPollService < BaseService voters_count = @json['votersCount'] - latest_options = items.map { |item| item['name'].presence || item['content'] } + latest_options = items.map { |item| item['name'].presence || item['content'] }.compact # If for some reasons the options were changed, it invalidates all previous # votes, so we need to remove them