Skip to content

Commit 7939ede

Browse files
committed
Merge branch 'CHEF-800' of git://github.com/nuoyan/chef into nuoyan/CHEF-800
2 parents d93cd19 + a8e7f9e commit 7939ede

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

chef/lib/chef/search/query.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ def search(type, query="*:*", sort=nil, start=0, rows=20, &block)
4343

4444
response = @rest.get_rest("search/#{type}?q=#{escape(query)}&sort=#{escape(sort)}&start=#{escape(start)}&rows=#{escape(rows)}")
4545
if block
46-
response["rows"].each { |o| block.call(o) }
46+
response["rows"].each { |o| block.call(o) unless o.nil?}
4747
unless (response["start"] + response["rows"].length) >= response["total"]
4848
nstart = response["start"] + rows
4949
search(type, query, sort, nstart, rows, &block)

0 commit comments

Comments
 (0)