about summary refs log tree commit diff
path: root/app/services/activitypub/process_poll_service.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/services/activitypub/process_poll_service.rb')
-rw-r--r--app/services/activitypub/process_poll_service.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/services/activitypub/process_poll_service.rb b/app/services/activitypub/process_poll_service.rb
index 903b6a78a..d83e614d8 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'] }.compact
+    latest_options = items.filter_map { |item| item['name'].presence || item['content'] }
 
     # If for some reasons the options were changed, it invalidates all previous
     # votes, so we need to remove them