Skip to content

Commit 78c86e6

Browse files
authored
Allow using Inertia without a session (#43)
1 parent 422a4ee commit 78c86e6

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/Http/Middleware/ShareInertiaData.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@ public function handle($request, $next)
3030
];
3131
},
3232
'user' => function () use ($request) {
33+
if (! $request->user()) {
34+
return;
35+
}
36+
3337
if (Jetstream::hasTeamFeatures() && $request->user()) {
3438
$request->user()->currentTeam;
3539
}

0 commit comments

Comments
 (0)