Skip to content

Commit

Permalink
chore: Reset resolver and hook when current tenant is nullified
Browse files Browse the repository at this point in the history
  • Loading branch information
ollieread committed Nov 19, 2024
1 parent 5595450 commit a00be22
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/Support/DefaultTenancy.php
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,11 @@ public function setTenant(?Tenant $tenant): static
event(new CurrentTenantChanged($this, $previousTenant, $tenant));
}

if ($tenant === null) {
$this->resolver = null;
$this->hook = null;
}

return $this;
}

Expand Down

0 comments on commit a00be22

Please sign in to comment.