Skip to content

Commit cc789af

Browse files
authored
Merge pull request #10 from johnwedgbury/patch-1
Protect getIterator() in case objects is null
2 parents c4b2a53 + 980c26a commit cc789af

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/ClickUp/Objects/AbstractObjectCollection.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ public function objects()
8282
*/
8383
public function getIterator()
8484
{
85-
return new \ArrayIterator($this->objects());
85+
return $this->objects() ? new \ArrayIterator($this->objects()) : new \EmptyIterator();
8686
}
8787
}
8888

0 commit comments

Comments
 (0)