Skip to content

Commit

Permalink
check for empty signUpUrl
Browse files Browse the repository at this point in the history
  • Loading branch information
alexcarpenter committed Dec 16, 2024
1 parent 8ed1cc9 commit 273f234
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/clerk-js/src/core/clerk.ts
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ export class Clerk implements ClerkInterface {
};

#isCombinedFlow(): boolean {
return this.#options.signInUrl === this.#options.signUpUrl;
return !this.#options.signUpUrl;
}

public signOut: SignOut = async (callbackOrOptions?: SignOutCallback | SignOutOptions, options?: SignOutOptions) => {
Expand Down
2 changes: 1 addition & 1 deletion packages/clerk-js/src/ui/contexts/components/SignIn.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export const useSignInContext = (): SignInContextType => {
const { queryParams, queryString } = useRouter();
const options = useOptions();
const clerk = useClerk();
const isCombinedFlow = options.signInUrl === options.signUpUrl;
const isCombinedFlow = !options.signUpUrl;

if (context === null || context.componentName !== 'SignIn') {
throw new Error(`Clerk: useSignInContext called outside of the mounted SignIn component.`);
Expand Down
2 changes: 1 addition & 1 deletion packages/clerk-js/src/ui/contexts/components/SignUp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export const useSignUpContext = (): SignUpContextType => {
const { queryParams, queryString } = useRouter();
const options = useOptions();
const clerk = useClerk();
const isCombinedFlow = options.signInUrl === options.signUpUrl;
const isCombinedFlow = !options.signUpUrl;

const initialValuesFromQueryParams = useMemo(
() => getInitialValuesFromQueryParams(queryString, SIGN_UP_INITIAL_VALUE_KEYS),
Expand Down

0 comments on commit 273f234

Please sign in to comment.