Skip to content

Commit 995a647

Browse files
ianmacartneyConvex, Inc.
authored andcommitted
await the token promise so the catch works (#41277)
as is, if `getToken` throws, it won't catch it and return `null` GitOrigin-RevId: ef959d0c113bbd30442097dfd60356f1e64e939e
1 parent 2f2f9f0 commit 995a647

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

npm-packages/convex/src/react-clerk/ConvexProviderWithClerk.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ function useUseAuthFromClerk(useAuth: UseAuth) {
6363
const fetchAccessToken = useCallback(
6464
async ({ forceRefreshToken }: { forceRefreshToken: boolean }) => {
6565
try {
66-
return getToken({
66+
return await getToken({
6767
template: "convex",
6868
skipCache: forceRefreshToken,
6969
});

0 commit comments

Comments
 (0)