lib/hubspot/form.rb in hubspot-ruby-0.4.0 vs lib/hubspot/form.rb in hubspot-ruby-0.5.0
- old
+ new
@@ -86,10 +86,10 @@
private
def assign_properties(hash)
@guid = hash['guid']
- @fields = hash['formFieldGroups'].inject([]){ |result, fg| result | fg['fields'] }
+ @fields = (hash['formFieldGroups'] || []).inject([]) { |result, fg| result | fg['fields'] }
@properties = hash
end
end
end