Skip to content

Commit

Permalink
Update HasRecords.php
Browse files Browse the repository at this point in the history
  • Loading branch information
danharrin committed Sep 11, 2024
1 parent 90605d3 commit b476d48
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion packages/tables/src/Table/Concerns/HasRecords.php
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,13 @@ public function getModel(): ?string
{
$query = $this->getQuery();

return $query?->getModel()::class;
$model = $query?->getModel();

if (blank($model)) {
return null;
}

return $model::class;
}

public function allowsDuplicates(): bool
Expand Down

0 comments on commit b476d48

Please sign in to comment.