Skip to content

Commit

Permalink
Merge pull request #10 from johnwedgbury/patch-1
Browse files Browse the repository at this point in the history
Protect getIterator() in case objects is null
  • Loading branch information
howyi authored Feb 22, 2023
2 parents c4b2a53 + 980c26a commit cc789af
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ClickUp/Objects/AbstractObjectCollection.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ public function objects()
*/
public function getIterator()
{
return new \ArrayIterator($this->objects());
return $this->objects() ? new \ArrayIterator($this->objects()) : new \EmptyIterator();
}
}

0 comments on commit cc789af

Please sign in to comment.