Dont die on empty results
Signed-off-by: Matt Aimonetti <mattaimonetti@gmail.com>
This commit is contained in:
parent
5140899041
commit
142989a80d
|
@ -209,8 +209,10 @@ module CouchRest
|
||||||
|
|
||||||
def remember_where_we_left_off(results, page)
|
def remember_where_we_left_off(results, page)
|
||||||
last_row = results['rows'].last
|
last_row = results['rows'].last
|
||||||
|
if last_row
|
||||||
@last_key = last_row['key']
|
@last_key = last_row['key']
|
||||||
@last_docid = last_row['id']
|
@last_docid = last_row['id']
|
||||||
|
end
|
||||||
@last_page = page
|
@last_page = page
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue