Skip to content

Commit

Permalink
Avoid user resolve twice (#902)
Browse files Browse the repository at this point in the history
  • Loading branch information
erikn69 committed Mar 14, 2024
1 parent 01ffb56 commit 27e1b31
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Auditable.php
Expand Up @@ -416,8 +416,9 @@ public function preloadResolverData()
{
$this->preloadedResolverData = $this->runResolvers();

if (!empty ($this->resolveUser())) {
$this->preloadedResolverData['user'] = $this->resolveUser();
$user = $this->resolveUser();
if (!empty ($user)) {
$this->preloadedResolverData['user'] = $user;
}

return $this;
Expand Down

0 comments on commit 27e1b31

Please sign in to comment.