Skip to content

Commit 28d7bf3

Browse files
Address potential IndexedDB failure in synchronizeQueryViewsAndRaiseSnapshots
1 parent 230cd48 commit 28d7bf3

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

packages/firestore/src/core/sync_engine.ts

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1110,14 +1110,10 @@ export class MultiTabSyncEngine extends SyncEngine
11101110
const queries = this.queriesByTarget.get(targetId);
11111111

11121112
if (queries && queries.length !== 0) {
1113-
// For queries that have a local View, we need to update their state
1114-
// in LocalStore (as the resume token and the snapshot version
1113+
// For queries that have a local View, we fetch their current state
1114+
// from LocalStore (as the resume token and the snapshot version
11151115
// might have changed) and reconcile their views with the persisted
11161116
// state (the list of syncedDocuments may have gotten out of sync).
1117-
await this.localStore.releaseTarget(
1118-
targetId,
1119-
/*keepPersistedTargetData=*/ true
1120-
);
11211117
targetData = await this.localStore.allocateTarget(
11221118
queries[0].toTarget()
11231119
);

0 commit comments

Comments
 (0)