Skip to content

Commit 46159f2

Browse files
authored
fix(react): avoid undefined 'id' property error (#151)
1 parent 14b261f commit 46159f2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/react/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ function useUseAuthFromBetterAuth(authClient: AuthClient) {
9292
function useAuthFromBetterAuth() {
9393
const { data: session, isPending: isSessionPending } =
9494
authClient.useSession();
95-
const sessionId = session?.session.id;
95+
const sessionId = session?.session?.id;
9696
const fetchAccessToken = useCallback(
9797
async () => {
9898
try {

0 commit comments

Comments
 (0)