Skip to content

Commit

Permalink
Merge pull request #13987 from tonypartridge/patch-8
Browse files Browse the repository at this point in the history
Ensure User is not null when getting default tenenat.
  • Loading branch information
danharrin committed Aug 20, 2024
2 parents cbae07b + 6b20eaf commit 06e1a06
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/panels/src/Panel/Concerns/HasRoutes.php
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ public function getUrl(?Model $tenant = null): ?string

$hasTenancy = $this->hasTenancy();

if ((! $tenant) && $hasTenancy) {
if ((! $tenant) && $hasTenancy && $this->auth()->hasUser()) {
$tenant = Filament::getUserDefaultTenant($this->auth()->user());
}

Expand Down

0 comments on commit 06e1a06

Please sign in to comment.