Skip to content

Commit 5968e21

Browse files
committed
PR Feedback
1 parent a540f3f commit 5968e21

File tree

1 file changed

+3
-2
lines changed
  • packages-exp/auth-exp/src/platform_browser/persistence

1 file changed

+3
-2
lines changed

packages-exp/auth-exp/src/platform_browser/persistence/indexed_db.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -164,9 +164,10 @@ function deleteObject(db: IDBDatabase, key: string): Promise<void> {
164164

165165
/** @internal */
166166
export const _POLLING_INTERVAL_MS = 800;
167+
/** @internal */
168+
export const _TRANSACTION_RETRY_COUNT = 3;
167169

168170
class IndexedDBLocalPersistence implements Persistence {
169-
private static readonly TRANSACTION_RETRY_COUNT = 3;
170171
static type: 'LOCAL' = 'LOCAL';
171172

172173
type = PersistenceType.LOCAL;
@@ -210,7 +211,7 @@ class IndexedDBLocalPersistence implements Persistence {
210211
const db = await this._openDb();
211212
return await op(db);
212213
} catch (e) {
213-
if (numAttempts++ > IndexedDBLocalPersistence.TRANSACTION_RETRY_COUNT) {
214+
if (numAttempts++ > _TRANSACTION_RETRY_COUNT) {
214215
throw e;
215216
}
216217
if (this.db) {

0 commit comments

Comments
 (0)