Skip to content

Commit b42931c

Browse files
committed
Move promise initialization out of constructor
1 parent 9d16784 commit b42931c

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

packages-exp/auth-exp/src/core/auth/auth_impl.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,16 +35,14 @@ export const DEFAULT_API_SCHEME = 'https';
3535

3636
class AuthImpl implements Auth {
3737
currentUser: User | null = null;
38-
private operations: Promise<void>;
38+
private operations = Promise.resolve();
3939
private persistenceManager?: PersistenceUserManager;
4040

4141
constructor(
4242
public readonly name: string,
4343
public readonly config: Config,
4444
persistenceHierarchy: Persistence[]
4545
) {
46-
this.operations = Promise.resolve();
47-
4846
// This promise is intended to float; auth initialization happens in the
4947
// background, meanwhile the auth object may be used by the app.
5048
// eslint-disable-next-line @typescript-eslint/no-floating-promises

0 commit comments

Comments
 (0)