Skip to content

Commit 43d5eff

Browse files
author
Brian Chen
committed
remove old node_persistence
1 parent 275e42d commit 43d5eff

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

packages/firestore/src/core/sync_engine.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -401,8 +401,8 @@ export class SyncEngine implements RemoteSyncer, SharedClientStateSyncer {
401401

402402
async applyRemoteEvent(remoteEvent: RemoteEvent): Promise<void> {
403403
this.assertSubscribed('applyRemoteEvent()');
404+
const changes = await this.localStore.applyRemoteEvent(remoteEvent);
404405
try {
405-
const changes = await this.localStore.applyRemoteEvent(remoteEvent);
406406
// Update `receivedDocument` as appropriate for any limbo targets.
407407
objUtils.forEach(remoteEvent.targetChanges, (targetId, targetChange) => {
408408
const limboResolution = this.limboResolutionsByTarget[Number(targetId)];
@@ -576,8 +576,8 @@ export class SyncEngine implements RemoteSyncer, SharedClientStateSyncer {
576576
// before listen events.
577577
this.processUserCallback(batchId, /*error=*/ null);
578578

579+
const changes = await this.localStore.acknowledgeBatch(mutationBatchResult);
579580
try {
580-
const changes = await this.localStore.acknowledgeBatch(mutationBatchResult);
581581
this.sharedClientState.updateMutationState(batchId, 'acknowledged');
582582
await this.emitNewSnapsAndNotifyLocalStore(changes);
583583
} catch (error) {
@@ -597,8 +597,8 @@ export class SyncEngine implements RemoteSyncer, SharedClientStateSyncer {
597597
// listen events.
598598
this.processUserCallback(batchId, error);
599599

600+
const changes = await this.localStore.rejectBatch(batchId);
600601
try {
601-
const changes = await this.localStore.rejectBatch(batchId);
602602
this.sharedClientState.updateMutationState(batchId, 'rejected', error);
603603
await this.emitNewSnapsAndNotifyLocalStore(changes);
604604
} catch (error) {

packages/firestore/test/util/node_persistence.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
*/
1717

1818
import * as fs from 'fs';
19-
// @ts-ignore
2019
import * as registerIndexedDBShim from 'indexeddbshim';
2120
import * as os from 'os';
2221

0 commit comments

Comments
 (0)