Skip to content

Commit

Permalink
Fix single model
Browse files Browse the repository at this point in the history
  • Loading branch information
Tofandel authored and ifox committed Oct 14, 2024
1 parent 7565932 commit 669bed0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Models/Behaviors/HasRelated.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public function loadRelated(string $browserName): Collection
*/
public function saveRelated(array|Collection|Model $items, string $browserName): void
{
$items = collect($items);
$items = is_array($items) || $items instanceof Collection ? $items : [$items];

/** @var Collection<int, RelatedItem> $itemsToProcess */
$itemsToProcess = $this->relatedItems()->where('browser_name', $browserName)->get();
Expand Down

0 comments on commit 669bed0

Please sign in to comment.