We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent bb97c27 commit e4ec036Copy full SHA for e4ec036
packages/firestore/src/local/indexeddb_persistence.ts
@@ -353,10 +353,10 @@ export class IndexedDbPersistence implements Persistence {
353
'readwrite',
354
ALL_STORES,
355
txn => {
356
- // NOTE: We don't need to validate the current owner contents, since
357
- // runTransaction does that automatically.
358
- const store = txn.store<DbOwnerKey, DbOwner>(DbOwner.store);
359
- return store.put('owner', new DbOwner(this.ownerId, Date.now()));
+ return this.ensureOwnerLease(txn).next(() => {
+ const store = txn.store<DbOwnerKey, DbOwner>(DbOwner.store);
+ return store.put('owner', new DbOwner(this.ownerId, Date.now()));
+ });
360
}
361
);
362
0 commit comments