Skip to content

Commit cc1404e

Browse files
committed
Clarify comment
1 parent 7a9a950 commit cc1404e

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

packages/ui/src/components/SignIn/useSignInStepGuard.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,10 @@ export function useSignInStepGuard({ redirectStatuses, onLeave }: UseSignInStepG
5656
return;
5757
}
5858

59-
// The flag is not reactive, so wait for the in-flight setActive to settle.
59+
// If the setActive that was running on mount never finishes in a way that
60+
// closes the signIn, for example when it's unrelated to the signIn process,
61+
// or fails, the component could get stuck in a loading state forever.
62+
// This timer is there to prevent that.
6063
const intervalId = setInterval(() => {
6164
if (clerk.__internal_setActiveInProgress) {
6265
return;

0 commit comments

Comments
 (0)