Skip to content

Commit 423fa88

Browse files
Send target to backend before local processing
1 parent bf93a38 commit 423fa88

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

packages/firestore/src/core/sync_engine_impl.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -314,6 +314,9 @@ export async function syncEngineListen(
314314
syncEngineImpl.localStore,
315315
queryToTarget(query)
316316
);
317+
if (syncEngineImpl.isPrimaryClient) {
318+
remoteStoreListen(syncEngineImpl.remoteStore, targetData);
319+
}
317320

318321
const status = syncEngineImpl.sharedClientState.addLocalQueryTarget(
319322
targetData.targetId
@@ -325,9 +328,6 @@ export async function syncEngineListen(
325328
targetId,
326329
status === 'current'
327330
);
328-
if (syncEngineImpl.isPrimaryClient) {
329-
remoteStoreListen(syncEngineImpl.remoteStore, targetData);
330-
}
331331
}
332332

333333
return viewSnapshot;

0 commit comments

Comments
 (0)