Skip to content

Commit 6cd62d0

Browse files
authored
Make sure models are unique
1 parent f363939 commit 6cd62d0

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/Models/Concerns/WithScroll.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,9 @@ public function isFetchable(): bool
8686
*/
8787
protected function mergeScrollItems(Collection $items): void
8888
{
89-
$this->models->push(...$items);
89+
$this->models = $this->models
90+
->mergeRecursive($items)
91+
->unique($this->getItemUniqueKey());
9092

9193
$this->refresh();
9294
}

0 commit comments

Comments
 (0)