Skip to content

Commit a6b40ba

Browse files
committed
[AUTOMATED]: Prettier Code Styling
1 parent 71f2411 commit a6b40ba

File tree

2 files changed

+30
-11
lines changed

2 files changed

+30
-11
lines changed

packages/firestore/src/local/local_documents_view.ts

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ import {
2525
maybeDocumentMap,
2626
NullableMaybeDocumentMap,
2727
nullableMaybeDocumentMap,
28-
documentKeySet,
28+
documentKeySet
2929
} from '../model/collections';
3030
import { Document, MaybeDocument, NoDocument } from '../model/document';
3131
import { DocumentKey } from '../model/document_key';
@@ -51,7 +51,7 @@ export class LocalDocumentsView {
5151
private remoteDocumentCache: RemoteDocumentCache,
5252
private mutationQueue: MutationQueue,
5353
private indexManager: IndexManager
54-
) { }
54+
) {}
5555

5656
/**
5757
* Get the local view of the document identified by `key`.
@@ -236,12 +236,20 @@ export class LocalDocumentsView {
236236
if (!query.path.isImmediateParentOf(key.path)) {
237237
continue;
238238
}
239-
if (mutation instanceof PatchMutation && results.get(mutation.key) === null) {
240-
missingBaseDocEntriesForPatching = missingBaseDocEntriesForPatching.add(mutation.key);
239+
if (
240+
mutation instanceof PatchMutation &&
241+
results.get(mutation.key) === null
242+
) {
243+
missingBaseDocEntriesForPatching = missingBaseDocEntriesForPatching.add(
244+
mutation.key
245+
);
241246
}
242247
}
243248
}
244-
return this.remoteDocumentCache.getEntries(transaction, missingBaseDocEntriesForPatching);
249+
return this.remoteDocumentCache.getEntries(
250+
transaction,
251+
missingBaseDocEntriesForPatching
252+
);
245253
})
246254
.next(baseDocsForPatching => {
247255
baseDocsForPatching.forEach((key, doc) => {

packages/firestore/test/unit/specs/query_spec.test.ts

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -104,9 +104,14 @@ describeSpec('Queries:', [], () => {
104104
[],
105105
() => {
106106
const fullQuery = Query.atPath(ResourcePath.fromString('collection'));
107-
const filteredQuery = fullQuery.addFilter(filter("match", "==", true));
107+
const filteredQuery = fullQuery.addFilter(filter('match', '==', true));
108108
const docA = doc('collection/a', 1000, { match: false });
109-
const docAv2Local = doc('collection/a', 1000, { match: true }, { hasLocalMutations: true });
109+
const docAv2Local = doc(
110+
'collection/a',
111+
1000,
112+
{ match: true },
113+
{ hasLocalMutations: true }
114+
);
110115

111116
return (
112117
spec()
@@ -115,12 +120,18 @@ describeSpec('Queries:', [], () => {
115120
.expectEvents(fullQuery, { added: [docA] })
116121

117122
// patch docA so that it will now match the filtered query.
118-
.userPatches("collection/a", {match: true })
119-
.expectEvents(fullQuery, { modified: [docAv2Local], hasPendingWrites: true })
123+
.userPatches('collection/a', { match: true })
124+
.expectEvents(fullQuery, {
125+
modified: [docAv2Local],
126+
hasPendingWrites: true
127+
})
120128
// Make sure docA shows up in filtered query.
121129
.userListens(filteredQuery)
122-
.expectEvents(filteredQuery, { added: [docAv2Local], fromCache: true,
123-
hasPendingWrites: true })
130+
.expectEvents(filteredQuery, {
131+
added: [docAv2Local],
132+
fromCache: true,
133+
hasPendingWrites: true
134+
})
124135
);
125136
}
126137
);

0 commit comments

Comments
 (0)