diff --git a/.changeset/ninety-toes-fix.md b/.changeset/ninety-toes-fix.md new file mode 100644 index 00000000000..2db4cdbc388 --- /dev/null +++ b/.changeset/ninety-toes-fix.md @@ -0,0 +1,5 @@ +--- +"@clerk/chrome-extension": patch +--- + +Appropriately handle fulfilled, but null, cookie promises diff --git a/packages/chrome-extension/src/utils/cookies.ts b/packages/chrome-extension/src/utils/cookies.ts index 754a4d910aa..bdf861bf443 100644 --- a/packages/chrome-extension/src/utils/cookies.ts +++ b/packages/chrome-extension/src/utils/cookies.ts @@ -25,7 +25,7 @@ export async function getClientCookie({ urls, name }: GetClientCookieParams) { const cookieResults = await Promise.allSettled(cookiePromises); for (const cookie of cookieResults) { - if (cookie.status === 'fulfilled') { + if (cookie.status === 'fulfilled' && cookie.value) { return cookie.value; } }