File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -30,12 +30,12 @@ export function useAttemptToEnableOrganizations(caller: 'useOrganization' | 'use
3030
3131 useEffect ( ( ) => {
3232 // Guard to not run this effect twice on Clerk resource update
33- if ( hasAttempted . current ) {
33+ if ( hasAttempted . current || ! clerk . loaded ) {
3434 return ;
3535 }
3636
3737 hasAttempted . current = true ;
38- clerk . __internal_attemptToEnableEnvironmentSetting ( {
38+ clerk . __internal_attemptToEnableEnvironmentSetting ?. ( {
3939 for : 'organizations' ,
4040 caller,
4141 } ) ;
Original file line number Diff line number Diff line change @@ -60,7 +60,7 @@ export const useOrganization: UseOrganization = () => {
6060 clerk ,
6161 value => {
6262 if ( value ?. loaded ) {
63- value . __internal_attemptToEnableEnvironmentSetting ( {
63+ value . __internal_attemptToEnableEnvironmentSetting ?. ( {
6464 for : 'organizations' ,
6565 caller : 'useOrganization' ,
6666 } ) ;
You can’t perform that action at this time.
0 commit comments