Skip to content

Commit 6ce705c

Browse files
fix(clerk-js): Ensure componentProps is defined before accessing routing (#5088)
1 parent f936cf1 commit 6ce705c

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@clerk/clerk-js': patch
3+
---
4+
5+
Fix issue accessing routing option when componentProps is undefined.

packages/clerk-js/src/ui/lazyModules/providers.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ type LazyComponentRendererProps = React.PropsWithChildren<
5757
type PortalProps = Parameters<typeof Portal>[0];
5858

5959
export const LazyComponentRenderer = (props: LazyComponentRendererProps) => {
60-
if (props.componentProps.routing === 'virtual') {
60+
if (props?.componentProps?.routing === 'virtual') {
6161
deprecated('routing="virtual"', 'Use routing="hash" instead.');
6262
}
6363
return (

0 commit comments

Comments
 (0)