Skip to content

Commit

Permalink
Check if items is empty
Browse files Browse the repository at this point in the history
  • Loading branch information
francoism90 authored Oct 31, 2024
1 parent 0bef9ed commit 6691e01
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Models/Concerns/WithScroll.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,10 @@ public function clear(): void

public function isFetchable(): bool
{
if ($this->items->isEmpty()) {
return true;
}

return is_null($this->getFetchLimits()) || $this->fetchCount < $this->getFetchLimits();
}

Expand Down

0 comments on commit 6691e01

Please sign in to comment.