-
Notifications
You must be signed in to change notification settings - Fork 453
fix(react): Respect ui prop when Clerk instance is passed to IsomorphicClerk #7997
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 2 commits
a2d370f
42cc094
3f4e299
2dc46ff
55641a5
6d1abce
8477178
1448607
0e9f584
421522c
9ec3201
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| *** | ||
|
|
||
| ## '@clerk/react': minor | ||
|
|
||
| The `ui` prop is now respected if a Clerk instance is passed via the `Clerk` prop to `IsomorphicClerk`. This fixes the 'Clerk was not loaded with Ui components' error in the Chrome Extension SDK. | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -474,7 +474,7 @@ export class IsomorphicClerk implements IsomorphicLoadedClerk { | |
| this.beforeLoad(clerk); | ||
| // Only load UI scripts in standard browser environments (not native/headless) | ||
| const shouldLoadUi = !this.options.Clerk && this.options.standardBrowser !== false; | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do you think
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nope. I was mostly starting with a draft PR so I could get snapshots, since this issue wasn't showing up in local testing. The updated change in 2dc46ff should be a better approach, but I still need to test it. |
||
| const ClerkUI = shouldLoadUi ? await this.getClerkUIEntryChunk() : undefined; | ||
| const ClerkUI = shouldLoadUi ? await this.getClerkUIEntryChunk() : this.options.ui?.ClerkUI; | ||
| await clerk.load({ ...this.options, ui: { ...this.options.ui, ClerkUI } }); | ||
| } | ||
| if (clerk.loaded) { | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.