Skip to content

Commit b4c2ccd

Browse files
committed
Simplest fix for the no results exception on events search
Fix for issue: #4
1 parent 0afec62 commit b4c2ccd

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

lib/ticketmaster/results/search.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ class Search < Result
33
attr_accessor :type
44

55
def results
6+
return [] if data['_embedded'].nil?
7+
68
data['_embedded'][type].map do |event|
79
Result.create(event, request, "Ticketmaster::#{type.capitalize.chop}")
810
end

0 commit comments

Comments
 (0)