mirror of
https://github.com/lukevella/rallly.git
synced 2025-04-29 10:16:32 +02:00
🐛 Fix guest users not merging when sign in (#1542)
This commit is contained in:
parent
0ac1d066ee
commit
5abea1e072
1 changed files with 1 additions and 1 deletions
|
@ -255,7 +255,7 @@ const getAuthOptions = (...args: GetServerSessionParams) =>
|
|||
if (!isInitialSocialLogin) {
|
||||
// merge guest user into newly logged in user
|
||||
const session = await getServerSession(...args);
|
||||
if (session?.user && session.user.email === null) {
|
||||
if (session?.user && !session.user.email) {
|
||||
await mergeGuestsIntoUser(user.id, [session.user.id]);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue