Skip to content

Commit 32a051b

Browse files
Keep options optional
1 parent b3a614c commit 32a051b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/firestore/exp/src/api/snapshot.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ export class DocumentSnapshot<T = firestore.DocumentData>
5959
return super.exists();
6060
}
6161

62-
data(options: firestore.SnapshotOptions = {}): T | undefined {
62+
data(options?: firestore.SnapshotOptions): T | undefined {
6363
if (!this._document) {
6464
return undefined;
6565
} else if (this._converter) {
@@ -77,7 +77,7 @@ export class DocumentSnapshot<T = firestore.DocumentData>
7777
const userDataWriter = new UserDataWriter(
7878
this._firestoreImpl._databaseId,
7979
/* timestampsInSnapshots= */ true,
80-
options.serverTimestamps || DEFAULT_SERVER_TIMESTAMP_BEHAVIOR,
80+
options?.serverTimestamps || DEFAULT_SERVER_TIMESTAMP_BEHAVIOR,
8181
key =>
8282
new DocumentReference(
8383
this._firestore,

0 commit comments

Comments
 (0)