Skip to content

Commit 5ebcbf8

Browse files
authored
Merge pull request #3275 from Dokploy/3274-null-server-ip
fix(auth): update admin check to safely access user property
2 parents 72cc7a2 + 67f4ca2 commit 5ebcbf8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/server/src/lib/auth.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ const { handler, api } = betterAuth({
4242
},
4343
});
4444

45-
if (admin) {
45+
if (admin?.user) {
4646
return [
4747
...(admin.user.serverIp
4848
? [`http://${admin.user.serverIp}:3000`]

0 commit comments

Comments
 (0)