Fix no-answer scenario for question valid answers

This commit is contained in:
Bertocq
2017-10-16 19:54:07 +02:00
parent 2e4c6dce2e
commit 0b5eed090e

View File

@@ -40,7 +40,7 @@ class Poll::Question < ActiveRecord::Base
end
def valid_answers
(super.try(:split, ',').compact || []).map(&:strip)
(super.try(:split, ',')&.compact || []).map(&:strip)
end
def copy_attributes_from_proposal(proposal)