diff --git a/bootstrap/helpers/shared.php b/bootstrap/helpers/shared.php index 011c86744..c0425a3f0 100644 --- a/bootstrap/helpers/shared.php +++ b/bootstrap/helpers/shared.php @@ -361,7 +361,7 @@ function refreshSession(?Team $team = null): void } if (! $team) { // Fall back to any team the user still belongs to. - $team = User::find(Auth::id())->teams()->first(); + $team = User::query()->find(Auth::id())?->teams()->first(); } }