Skip to content

Commit 830c2c5

Browse files
committed
Address review feedback.
1 parent f6d12d2 commit 830c2c5

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

packages-exp/auth-exp/src/core/persistence/persistence_user_manager.ts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -113,17 +113,16 @@ export class PersistenceUserManager {
113113
);
114114
}
115115

116-
// Use the first persistence that supports a full read-write roundtrip (._isAvailable()).
117-
let chosenPersistence: PersistenceInternal | null = null;
116+
// Use the first persistence that supports a full read-write roundtrip (or fallback to memory).
117+
let chosenPersistence = _getInstance<PersistenceInternal>(
118+
inMemoryPersistence
119+
);
118120
for (const persistence of persistenceHierarchy) {
119121
if (await persistence._isAvailable()) {
120122
chosenPersistence = persistence;
121123
break;
122124
}
123125
}
124-
chosenPersistence =
125-
chosenPersistence ||
126-
_getInstance<PersistenceInternal>(inMemoryPersistence);
127126

128127
// However, attempt to migrate users stored in other persistences (in the hierarchy order).
129128
let userToMigrate: UserInternal | null = null;

0 commit comments

Comments
 (0)