Skip to content

Commit 2413878

Browse files
committed
Format
1 parent 6b69abb commit 2413878

File tree

2 files changed

+15
-15
lines changed

2 files changed

+15
-15
lines changed

packages/firestore-compat/src/api/database.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -977,8 +977,8 @@ export class QueryDocumentSnapshot<T = PublicDocumentData>
977977
return data as T;
978978
} else {
979979
_debugAssert(
980-
data !== undefined,
981-
'Document in a QueryDocumentSnapshot should exist'
980+
data !== undefined,
981+
'Document in a QueryDocumentSnapshot should exist'
982982
);
983983
return data;
984984
}

packages/firestore-compat/test/database.test.ts

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1651,19 +1651,19 @@ apiDescribe('Database', (persistence: boolean) => {
16511651
it('for DocumentReference.withConverter() that returns undefined', () => {
16521652
return withTestDb(persistence, async db => {
16531653
const docRef = db
1654-
.collection('posts')
1655-
.doc()
1656-
.withConverter({
1657-
toFirestore(post: Post): firestore.DocumentData {
1658-
return {title: post.title, author: post.author};
1659-
},
1660-
fromFirestore(
1661-
snapshot: firestore.QueryDocumentSnapshot,
1662-
options: firestore.SnapshotOptions
1663-
): Post | undefined {
1664-
return undefined;
1665-
}
1666-
});
1654+
.collection('posts')
1655+
.doc()
1656+
.withConverter({
1657+
toFirestore(post: Post): firestore.DocumentData {
1658+
return { title: post.title, author: post.author };
1659+
},
1660+
fromFirestore(
1661+
snapshot: firestore.QueryDocumentSnapshot,
1662+
options: firestore.SnapshotOptions
1663+
): Post | undefined {
1664+
return undefined;
1665+
}
1666+
});
16671667

16681668
await docRef.set(new Post('post', 'author'));
16691669
const postData = await docRef.get();

0 commit comments

Comments
 (0)