lib/hackerone/client/report.rb in hackerone-client-0.3.0 vs lib/hackerone/client/report.rb in hackerone-client-0.3.1
- old
+ new
@@ -66,11 +66,13 @@
def writeup_classification
classification_label().split("-").first
end
def activities
- relationships.dig(:activities, :data)&.map do |activity_data|
- Activities.build(activity_data)
+ if ships = relationships.fetch(:activities, {}).fetch(:data, [])
+ ships.map do |activity_data|
+ Activities.build(activity_data)
+ end
end
end
private