Skip to content

Commit 9d5736f

Browse files
committed
Check response is empty
1 parent fdf0956 commit 9d5736f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/statistics/client.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ def fetch_events(group_id:, since_at: nil, until_at: nil)
119119

120120
collection = @client.get_object("#{group_id}/events", params)
121121
events.push(*collection.to_a)
122-
while collection.paging['next'] do
122+
while !collection.empty? && collection.paging['next'] do
123123
events.push(*collection.next_page.to_a)
124124
end
125125

0 commit comments

Comments
 (0)