Skip to content

Commit

Permalink
Check if the user is null when logging out #1269
Browse files Browse the repository at this point in the history
  • Loading branch information
alecritson authored Sep 28, 2023
2 parents a256047 + 072ad32 commit 1f25964
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/core/src/Listeners/CartSessionAuthListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public function login(Login $event)
*/
public function logout(Logout $event)
{
if (! is_lunar_user($event->user)) {
if (is_null($event->user) || ! is_lunar_user($event->user)) {
return;
}

Expand Down

1 comment on commit 1f25964

@vercel
Copy link

@vercel vercel bot commented on 1f25964 Sep 28, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.