Skip to content

Commit

Permalink
fix(clerk-js): Ensure componentProps is defined before accessing ro…
Browse files Browse the repository at this point in the history
…uting (#5088)
  • Loading branch information
alexcarpenter authored Feb 6, 2025
1 parent f936cf1 commit 6ce705c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/perfect-carrots-arrive.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@clerk/clerk-js': patch
---

Fix issue accessing routing option when componentProps is undefined.
2 changes: 1 addition & 1 deletion packages/clerk-js/src/ui/lazyModules/providers.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ type LazyComponentRendererProps = React.PropsWithChildren<
type PortalProps = Parameters<typeof Portal>[0];

export const LazyComponentRenderer = (props: LazyComponentRendererProps) => {
if (props.componentProps.routing === 'virtual') {
if (props?.componentProps?.routing === 'virtual') {
deprecated('routing="virtual"', 'Use routing="hash" instead.');
}
return (
Expand Down

0 comments on commit 6ce705c

Please sign in to comment.