about summary refs log tree commit diff
path: root/app/services
diff options
context:
space:
mode:
authorThibaut Girka <thib@sitedethib.com>2019-11-30 17:29:44 +0100
committerThibaut Girka <thib@sitedethib.com>2019-11-30 17:29:44 +0100
commit2b7158427f5a80728dfc04913a4d7a78471a1703 (patch)
tree4d55c1f3502880bb0f20cd1daab081a8685d0f0c /app/services
parent93b8aec7b7cd6af1b6ef6385cfe138fb32dee6e9 (diff)
parentb532ead798c481fd03be9eb78e910d62654cdaa8 (diff)
Merge branch 'master' into glitch-soc/merge-upstream
Diffstat (limited to 'app/services')
-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 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