Skip to content

Commit

Permalink
fix(chrome-extension): Appropriately handle fulfilled, but null, cook…
Browse files Browse the repository at this point in the history
…ie promises (#3788)
  • Loading branch information
tmilewski authored and BRKalow committed Jul 24, 2024
1 parent 04b15a2 commit e44c21c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/ninety-toes-fix.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@clerk/chrome-extension": patch
---

Appropriately handle fulfilled, but null, cookie promises
2 changes: 1 addition & 1 deletion packages/chrome-extension/src/utils/cookies.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
Expand Down

0 comments on commit e44c21c

Please sign in to comment.