You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 7, 2020. It is now read-only.
I've recently encountered an error that occurs while trying to iterate over orders, or simply checking the count of orders, when no orders are returned. I have tracked this down to line 39-41 of paged_ecwid_response.rb:
response.body["items"].each do |item|
yielder << block.call(item)
end
If this block is moved below where count, offset, and total are set and then wrapped in an if count > 0 both iteration and count checks work as expected.
The text was updated successfully, but these errors were encountered:
Made this changes, as @aleccarper suggested [here](davidbiehl#6 (comment))
I was encountering those issue quite often while using this gem on my production app, @davidbiehl also asked for pull request, so I made it
Hello,
I've recently encountered an error that occurs while trying to iterate over orders, or simply checking the count of orders, when no orders are returned. I have tracked this down to line 39-41 of paged_ecwid_response.rb:
If this block is moved below where count, offset, and total are set and then wrapped in an
if count > 0
both iteration and count checks work as expected.The text was updated successfully, but these errors were encountered: