Skip to content

Commit

Permalink
Fix avoid recursive reference in relation
Browse files Browse the repository at this point in the history
  • Loading branch information
Tofandel committed Jun 5, 2024
1 parent 432ad29 commit cf761f0
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/Models/Behaviors/HasRelated.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ public function loadRelated(string $browserName): Collection
/** @var \A17\Twill\Models\Model $model */
if ($model = $item->related) {
$model->setRelation('pivot', $item);
$item->unsetRelation('related');

return $model;
}
Expand Down

0 comments on commit cf761f0

Please sign in to comment.