Skip to content

Commit b17e0fd

Browse files
committed
fix: typo
1 parent 2df0a2a commit b17e0fd

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

packages/plugin-firestore/src/helpers/getFirestore.ts

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,15 @@ function applyQueryClause(queryClause: QueryClause): QueryCompositeFilterConstra
2929
if ('and' in queryClause) {
3030
return and(
3131
...queryClause.and.map((clause) =>
32-
isArray(clause) ? where(...clause) : applyQueryClause(clause)
33-
)
32+
isArray(clause) ? where(...clause) : applyQueryClause(clause),
33+
),
3434
)
3535
}
3636
if ('or' in queryClause) {
3737
return or(
3838
...queryClause.or.map((clause) =>
39-
isArray(clause) ? where(...clause) : applyQueryClause(clause)
40-
)
39+
isArray(clause) ? where(...clause) : applyQueryClause(clause),
40+
),
4141
)
4242
}
4343
throw new Error('invalid query')
@@ -47,15 +47,15 @@ function applyQueryClauseDebug(queryClause: QueryClause): string {
4747
if ('and' in queryClause) {
4848
const params = queryClause.and
4949
.map((clause) =>
50-
isArray(clause) ? `where(${arrStr(clause)})` : applyQueryClauseDebug(clause)
50+
isArray(clause) ? `where(${arrStr(clause)})` : applyQueryClauseDebug(clause),
5151
)
5252
.join(', ')
5353
return `and(${params})`
5454
}
5555
if ('or' in queryClause) {
5656
const params = queryClause.or
5757
.map((clause) =>
58-
isArray(clause) ? `where(${arrStr(clause)})` : applyQueryClauseDebug(clause)
58+
isArray(clause) ? `where(${arrStr(clause)})` : applyQueryClauseDebug(clause),
5959
)
6060
.join(', ')
6161
return `or(${params})`
@@ -70,7 +70,7 @@ export function getQueryInstance(
7070
collectionPath: string,
7171
config: FirestoreModuleConfig,
7272
db: Firestore,
73-
debug: boolean
73+
debug: boolean,
7474
): Query {
7575
let q: CollectionReference | Query
7676

@@ -107,7 +107,7 @@ export function getQueryInstance(
107107
q,
108108
Array.isArray(config.startAfter)
109109
? startAfter(...config.startAfter)
110-
: startAfter(config.startAfter)
110+
: startAfter(config.startAfter),
111111
)
112112
qDebugString = `query(${qDebugString}, ${
113113
Array.isArray(config.startAfter)
@@ -132,12 +132,12 @@ const myQuery = ${qDebugString}
132132
133133
getDocs(myQuery)
134134
.then(console.info)
135-
.error(console.error)`,
136-
{ preventLogFor: 10_000 }
135+
.catch(console.error)`,
136+
{ preventLogFor: 10_000 },
137137
)
138138
if (!(window as any).magnetarDebugAddFirebaseToWindowExplained) {
139139
logWithFlair(
140-
`execute \`magnetarDebugAddFirebaseToWindow()\` to add these Firebase JS SDK variables to the window for debugging: db, getDocs, onSnapshot, getCountFromServer, and, collection, collectionGroup, limit, or, orderBy, query, startAfter, where`
140+
`execute \`magnetarDebugAddFirebaseToWindow()\` to add these Firebase JS SDK variables to the window for debugging: db, getDocs, onSnapshot, getCountFromServer, and, collection, collectionGroup, limit, or, orderBy, query, startAfter, where`,
141141
)
142142
;(window as any).magnetarDebugAddFirebaseToWindow = () => {
143143
;(window as any).db = db
@@ -164,7 +164,7 @@ getDocs(myQuery)
164164
export function docSnapshotToDocMetadata(
165165
docSnapshot:
166166
| DocumentSnapshot<{ [key: string]: unknown }>
167-
| QueryDocumentSnapshot<{ [key: string]: unknown }>
167+
| QueryDocumentSnapshot<{ [key: string]: unknown }>,
168168
): DocMetadata {
169169
const docMetaData: DocMetadata = {
170170
data: docSnapshot.data(),

0 commit comments

Comments
 (0)