Skip to content

Commit

Permalink
Allow using Inertia without a session (#43)
Browse files Browse the repository at this point in the history
  • Loading branch information
m1guelpf authored Sep 4, 2020
1 parent 422a4ee commit 78c86e6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Http/Middleware/ShareInertiaData.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ public function handle($request, $next)
];
},
'user' => function () use ($request) {
if (! $request->user()) {
return;
}

if (Jetstream::hasTeamFeatures() && $request->user()) {
$request->user()->currentTeam;
}
Expand Down

0 comments on commit 78c86e6

Please sign in to comment.