From 78d3dc3df2563ab014cf7647663e27e3aa79ee54 Mon Sep 17 00:00:00 2001 From: Isaiah Zwick-Schachter Date: Thu, 14 Dec 2017 06:13:15 -0500 Subject: [PATCH] Dealt with unanswered questions --- lib/se/api/types/question.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/se/api/types/question.rb b/lib/se/api/types/question.rb index 6c73161..82c3cef 100644 --- a/lib/se/api/types/question.rb +++ b/lib/se/api/types/question.rb @@ -5,7 +5,7 @@ class Question < Post def initialize(item_json) super(item_json) - @answers = item_json["answers"].map { |i| Answer.new(i) } + @answers = Array(item_json["answers"]).map { |i| Answer.new(i) } end end end