Skip to content

Commit

Permalink
fix: empty root collections
Browse files Browse the repository at this point in the history
  • Loading branch information
morrislaptop committed Jun 8, 2018
1 parent 626cbbc commit 2e25dd7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Query.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ public function documents(array $options = [])
{
$value = $this->apiClient->get($this->uri);

if (empty($value)) {
return [];
}

$rows = [];
foreach ($value['documents'] as $doc)
{
Expand Down

0 comments on commit 2e25dd7

Please sign in to comment.