@@ -166,7 +166,7 @@ export class Clerk implements ClerkInterface {
166
166
//@ts -expect-error with being undefined even though it's not possible - related to issue with ts and error thrower
167
167
#fapiClient: FapiClient ;
168
168
#instanceType?: InstanceType ;
169
- #isReady = false ;
169
+ #loaded = false ;
170
170
171
171
#listeners: Array < ( emission : Resources ) => void > = [ ] ;
172
172
#options: ClerkOptions = { } ;
@@ -189,7 +189,7 @@ export class Clerk implements ClerkInterface {
189
189
}
190
190
191
191
get loaded ( ) : boolean {
192
- return this . #isReady ;
192
+ return this . #loaded ;
193
193
}
194
194
195
195
get isSatellite ( ) : boolean {
@@ -264,10 +264,8 @@ export class Clerk implements ClerkInterface {
264
264
265
265
public getFapiClient = ( ) : FapiClient => this . #fapiClient;
266
266
267
- public isReady = ( ) : boolean => this . #isReady;
268
-
269
267
public load = async ( options ?: ClerkOptions ) : Promise < void > => {
270
- if ( this . #isReady ) {
268
+ if ( this . loaded ) {
271
269
return ;
272
270
}
273
271
@@ -295,9 +293,9 @@ export class Clerk implements ClerkInterface {
295
293
) ;
296
294
297
295
if ( this . #options. standardBrowser ) {
298
- this . #isReady = await this . #loadInStandardBrowser( ) ;
296
+ this . #loaded = await this . #loadInStandardBrowser( ) ;
299
297
} else {
300
- this . #isReady = await this . #loadInNonStandardBrowser( ) ;
298
+ this . #loaded = await this . #loadInNonStandardBrowser( ) ;
301
299
}
302
300
} ;
303
301
@@ -869,7 +867,7 @@ export class Clerk implements ClerkInterface {
869
867
params : HandleOAuthCallbackParams = { } ,
870
868
customNavigate ?: ( to : string ) => Promise < unknown > ,
871
869
) : Promise < unknown > => {
872
- if ( ! this . #isReady || ! this . #environment || ! this . client ) {
870
+ if ( ! this . loaded || ! this . #environment || ! this . client ) {
873
871
return ;
874
872
}
875
873
const { signIn, signUp } = this . client ;
@@ -1500,7 +1498,7 @@ export class Clerk implements ClerkInterface {
1500
1498
} ;
1501
1499
1502
1500
#buildUrl = ( key : 'signInUrl' | 'signUpUrl' , options ?: SignInRedirectOptions | SignUpRedirectOptions ) : string => {
1503
- if ( ! this . #isReady || ! this . #environment || ! this . #environment. displayConfig ) {
1501
+ if ( ! this . loaded || ! this . #environment || ! this . #environment. displayConfig ) {
1504
1502
return '' ;
1505
1503
}
1506
1504
0 commit comments