Skip to content

Commit c2e6aaa

Browse files
committed
format code
1 parent b41f528 commit c2e6aaa

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

packages/firestore/src/core/view.ts

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -273,10 +273,10 @@ export class View {
273273
* @param docChanges - The set of changes to make to the view's docs.
274274
* @param updateLimboDocuments - Whether to update limbo documents based on
275275
* this change.
276-
* @param waitForRequeryResult - Whether the target is pending to run a full
277-
* re-query due to existence filter mismatch.
278276
* @param targetChange - A target change to apply for computing limbo docs and
279277
* sync state.
278+
* @param waitForRequeryResult - Whether the target is pending to run a full
279+
* re-query due to existence filter mismatch.
280280
* @returns A new ViewChange with the given docs, changes, and sync state.
281281
*/
282282
// PORTING NOTE: The iOS/Android clients always compute limbo document changes.
@@ -303,10 +303,9 @@ export class View {
303303
});
304304

305305
this.applyTargetChange(targetChange);
306-
const limboChanges =
307-
!waitForRequeryResult && updateLimboDocuments
308-
? this.updateLimboDocuments()
309-
: [];
306+
const limboChanges = updateLimboDocuments
307+
? this.updateLimboDocuments(waitForRequeryResult ?? false)
308+
: [];
310309

311310
// We are at synced state if there is no limbo docs are waiting to be resolved, view is current
312311
// with the backend, and the query is not pending for full re-query result due to existence
@@ -413,9 +412,11 @@ export class View {
413412
}
414413
}
415414

416-
private updateLimboDocuments(): LimboDocumentChange[] {
415+
private updateLimboDocuments(
416+
waitForRequeryResult: boolean
417+
): LimboDocumentChange[] {
417418
// We can only determine limbo documents when we're in-sync with the server.
418-
if (!this.current) {
419+
if (waitForRequeryResult || !this.current) {
419420
return [];
420421
}
421422

0 commit comments

Comments
 (0)