Skip to content

Commit

Permalink
Prevent detecting infinite loops with async
Browse files Browse the repository at this point in the history
  • Loading branch information
Sammyjo20 committed Sep 30, 2023
1 parent 74c91cd commit 3b510b3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Paginator.php
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ public function __construct(Connector $connector, Request $request)
$this->totalResults += count($pageItems);
})
->onResponse(function (Response $response): void {
if ($this->detectInfiniteLoop === false) {
if ($this->detectInfiniteLoop === false || $this->isAsyncPaginationEnabled() === true) {
return;
}

Expand Down

0 comments on commit 3b510b3

Please sign in to comment.